package main import . "fmt" import . "math/big" func main() { var a,b,h,w int64 Scan(&a,&b,&h,&w) aa:=NewRat(a,1) bb:=NewRat(b,1) hh:=NewRat(h*h,1) ww:=NewRat(w*w,1) aabb:=new(Rat).Mul(aa,bb) s1:=new(Rat).Mul(aabb,new(Rat).Quo(ww,aa)) s2:=new(Rat).Mul(aabb,new(Rat).Quo(hh,bb)) s3:=new(Rat).Mul(aabb,new(Rat).Quo(ww,bb)) s4:=new(Rat).Mul(aabb,new(Rat).Quo(hh,aa)) if s1.Cmp(s2)>0 { s1=s2 } if s3.Cmp(s4)>0 { s3=s4 } switch s1.Cmp(s3) { case -1: Println("Rotating") case 0: Println("Same") case 1: Println("Non-rotating") } }