#include <bits/stdc++.h>
using namespace std;
typedef double D;

D calcX(
    D a,D b,D p,
    D c,D d,D q
){  return (d*p-b*q)/(a*d-b*c);}
D calcY(
    D a,D b,D p,
    D c,D d,D q
){
    return (a*q-c*p)/(a*d-b*c);}
int main() {
    D c1,c2,c3,c4;
    cin>>c1>>c2>>c3>>c4;
    D a=calcX(c1,c2,c3,c2,c3,c4);
    D b=calcY(c1,c2,c3,c2,c3,c4);
    if(b*b+4*a>=0)cout<<"R"<<endl;
    else cout<<"I"<<endl;
    return 0;
}