a, b, c, d, e, f = map(int, input().split()) di = a * e - b * d xa = c * e - b * f ya = a * f - d * c print(xa / di, ya / di)