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

void main()
{
  string line;
  while ((line = readln) !is null) {
    auto rd = line.split.to!(real[]);
    auto a = rd[0], b = rd[1], c = rd[2];
    auto d = rd[3], e = rd[4], f = rd[5];

    auto g = a * e - b * d;
    auto x = (c * e - b * f) / g;
    auto y = (a * f - d * c) / g;

    writefln("%.3f %.3f", x, y);
  }
}