c1, c2, c3, c4 = map(int, raw_input().split()) p = (c2 * c2 - c3) * 2 q = c2 * c3 - c4 r = c2 * c4 - c3 * c3 s = c1 * c3 - c2 * c2 print p, q, r, s if p != 0: D = p * p * s + 4 * p * q * r print D if D >= 0: print 'R' else: print 'I' else: print 'R'