/* Problem 2--Cylindrical Mirror
   This was probably the hardest problem in the contest.  I attempted to
   work out a formula for the problem, but when the formula started
   getting unwieldy, I decided on a different technique.  If you solve
   the problem the other way--have Michelle look in the mirror at a
   specific angle, it isn't too bad to figure out if Rush is to the left
   or to the right of her line of sight.  So, with trial and error and
   binary search, you can get the precise angle. */

import java.io.*;
import java.util.*;

public class prob2 {

 public static Scanner in = null;
 public static PrintWriter out = null;
 public final static double r = 10;
 public static int cs = 0;

 public static void main (String[] args) throws Exception {

  in = new Scanner (new File ("prob2.in"));
  out = new PrintWriter ("prob2.out");
  double x0=0;
  while ((x0=in.nextDouble()) != 0) { // Read in the data.
   double x = in.nextDouble(), y = in.nextDouble();
   boolean neg=false;
   if (y < 0) {neg=true; y=-y;} // Problem is symmetric.  If Rush is to
   double bdm = Math.sqrt ((r*r)/(x0*x0-r*r)); //the right, just reflect
   double bda = Math.atan (bdm)*180/Math.PI; //bda is Rush's max angle
   if (angcmp (bda,x0,x,y)==1) { //If Rush is outside the range
    out.println ("Case "+(++cs)+
             ": Michelle cannot see Rush's reflection.");
    out.println ();
   } else {
    double top=bda, bottom=0, mid=0;
    while ((top-bottom)>1e-5) { //Scan through looking for Rush's angle
     mid = (top+bottom)/2;
     if (angcmp (mid,x0,x,y)==1) bottom=mid; else top=mid;
    }
    mid = (top+bottom)/2;
    int imid = (int)(10*mid+0.5);
    out.print ("Case "+(++cs)+": Michelle can see Rush's reflection "+
                 imid/10 + "." + imid%10
                 +" degrees to the ");
    if (neg) out.println ("right."); else out.println ("left.");
    out.println();
   }
  }
  in.close();
  out.close();
 }

 /* angcmp returns 1 if Rush (x,y) lies to the right of the angle (ang)
    that Michelle (x0) is looking, -1 if to the right, and 0 if dead-on.
 */
 public static int angcmp (double ang, double x0, double x, double y) {

  double m = Math.tan (ang*Math.PI/180);
  double a = 1+m*m, b = -2*m*m*x0, c = m*m*x0*x0-r*r;
  double discr = b*b-4*a*c;
  if (Math.abs(discr) < 1e-5) discr=0;
  double xi = (-b - Math.sqrt (discr))/(2*a), // posn on mirror that
         yi = Math.sqrt (r*r-xi*xi);              // Michelle sees.
  double tangang = Math.atan (-xi/yi)*180/Math.PI, // angle of mirror
         reflang = 2*tangang - ang;  //angle of reflection
  double otherang = Math.atan2 (y-yi,x-xi)*180/Math.PI;
  if (otherang < -90) otherang += 360;
         //Rush's angle to mirror point.
  if (Math.abs (otherang-reflang)< 1e-5) return 0;
  if (otherang < reflang) return 1;
  return -1;
 }
}
