#!/usr/bin/python3 c1, c2, c3, c4 = list(map(int, input().split())) A = (c1*c4-c2*c3)/(c1*c3-c2**2) B = (c2*c4-c3**2)/(c1*c3-c2**2) print(A) print(B) f = (A**2 - 4*B >= 0) print("R") if f else print("I")