package yukicoder; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args)throws Exception{ new Main().solve(); } void solve(){ Scanner sc=new Scanner(System.in); double c1=sc.nextDouble(); double c2=sc.nextDouble(); double c3=sc.nextDouble(); double c4=sc.nextDouble(); double[][] v1={{c3},{c4}}; double[][] A={{c2,-c1},{c3,-c2}}; double[][] v2=MtPrd(ReMt(A),v1); double a=v2[0][0]; double b=v2[1][0]; if(a*a-4*b>=0){ System.out.println("R"); }else{ System.out.println("I"); } } //行列の引き算 A-B double[][] MtSbtr(double[][] A,double[][] B){ return MtSum(A,Mtce(-1,B)); } //行列の定数倍 kA double[][] Mtce(double k,double[][] A){ double[][] B=new double[A.length][A[0].length]; for(int i=0;i=0){ if((b.remainder(BigInteger.valueOf(10)).compareTo(BigInteger.valueOf(1)))==0){ B=MtPrd(A,B); b=b.subtract(BigInteger.valueOf(1)); b=b.divide(BigInteger.valueOf(10)); }else if((b.remainder(BigInteger.valueOf(10)).compareTo(BigInteger.valueOf(1)))!=0){ b=b.divide(BigInteger.valueOf(10)); } A=MtPrd(A,A); } return B; } //行列式;detA(Aが正方行列であることを仮定) double detMt(double[][] A){ double sum=0; if(A.length==1||A[0].length==1){ return A[0][0]; }else{ for(int j=0;j=i-1){ kk++ ; } if(l>=j-1){ ll++; } B[k][l]=A[kk][ll]; } } return B; } void showMt(double[][] A){ for(int i=0;i