c1, c2, c3, c4 = map(int, input().split()) if c2 * c2 > c1 * c3 and c4 * c1**2 == 3 * c1 * c2 * c3 - 2 * c2**3: print('I') else: print('R')