a, b, c, d, e, f = map(int, input().split()) x = ((e*c)-(b*f)) // ((a*e)-(d*b)) y = ((a*f)-(d*c)) // ((a*e)-(d*b)) print(x, y)
x = (c*e - f*b) // (a*e - d*b) y = (c - a*x) // b
늘 예외를 조심하쟈