c1, c2, c3, c4 = map(int, raw_input().split()) d = c1*c1*c4*c4 - 6*c1*c2*c3*c4 + 4*c1*c3*c3*c3 + 4*c2*c2*c2*c4 - 3*c2*c2*c3*c3 print "R" if d > 0 else "I"