def main(): a,b,c,d,e,f = map(int,input().split()) child = (a*f) - (d*c) mother = (a*e) - (b*d) y = child/mother child = b*f - e*c mother = b*d - e*a x = child/mother return x,y x,y = main() print(x,y)