import java.io.*;
import java.util.*;

public class Angle{
	public static void main (String[] args){
		File infile = new File("data1.txt");
		File outfile = new File("out1.txt");
		Scanner reader;
		PrintStream ps;
		try{
			reader=new Scanner(infile);
			ps=new PrintStream(new FileOutputStream(outfile));
			int x1, y1, x2, y2;
			double angle1, angle2, result;
			for (int i=0;i<5;i++){
				x1 = reader.nextInt();
				y1 = reader.nextInt();
				x2 = reader.nextInt();
				y2 = reader.nextInt();
				if (x1<0){
					angle1=Math.atan((double)-y1/-x1)+Math.PI;
				} else {
					if (x1==0){
						if (y1>0){
							angle1=Math.PI/2;
						} else{
							angle1=-Math.PI/2;
						}
					} else {
						angle1=Math.atan((double)y1/x1);
					}
				}
				if (x2<0){
					angle2=Math.atan((double)-y2/-x2)+Math.PI;
				} else {
					if (x2==0){
						if (y2>0){
							angle2=Math.PI/2;
						} else{
							angle2=-Math.PI/2;
						}
					} else {
						angle2=Math.atan((double)y2/x2);
					}
				}
				result = Math.toDegrees(angle1-angle2);
				while (result<0){
					result+=360;
				}
				ps.print(Math.round(result*10)/10.0);
				ps.println();
			}
		reader.close();
		ps.close();
		} catch (Exception e){
			System.out.println("An exception has occurred. The operation could not be completed.");
		}
	}
}
