import numpy as np a,b,c,d,e,f=map(int,input().split()) det=a*e-b*d mat=np.array([[e,-b],[-d,a]]) vec=np.array([[c],[f]]) mat=mat/det vec=np.dot(mat,vec) print(vec[0][0],vec[1][0])