import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
double a = scn.nextInt();
double b=scn.nextInt();
double c=scn.nextInt();
if(a<100 && a>-100 && b<100 && b>-100 && c<100 && c>-100 ) {
double R1;
double R2;
// long C = (long)(Math.pow((Math.pow(b, 2)-4*a*c),0.5));
//System.out.println(C);
long C = (long)((Math.pow(b, 2)-4*a*c));
if(C<0) {
System.out.println("IMAGINARY ROOTS");
}
else {
C = (long)Math.pow(C,0.5);
R1 = (-b + C)/(2*a);
R2 = (-b - C)/(2*a);
if(R1==R2)
System.out.println("REAL AND EQUAL");
else
System.out.println("REAL AND DISTINCT");
if(R1<R2){
System.out.print(R1 + "\t");
System.out.print(R2);
}
else{
System.out.print(R2 + "\t");
System.out.print(R1);
}
}
}
}
}