import std.stdio, std.range, std.algorithm, std.conv, std.string, std.math, std.typecons;

void main() {
  while (true) {
    auto str = readln;
    if (stdin.eof) break;
    auto a = str.split.to!(double[]);
    auto denom = a[0] * a[4] - a[1] * a[3];
    auto x = (a[4] * a[2] - a[1] * a[5]) / denom;
    auto y = (-a[3] * a[2] + a[0] * a[5]) / denom;
    writeln(x, " ", y);
  }
}