import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.math;

void solve(int a, int b, int c, int d, int e, int f) {
  double det = a * e - b * d;
  double xt  = c * e - b * f;
  double yt  = a * f - c * d;

  double x = xt / det;
  double y = yt / det;

  if(x >= -0.0005 && x < 0.0005) x = 0.0;
  if(y >= -0.0005 && y < 0.0005) y = 0.0;
  
  writefln("%.3f %.3f", x, y);
}

void main() {
  int[][] data;

  while(true) {
    auto input = readln();
    if(stdin.eof()) break;

    auto d = split(input);
    data ~= [to!int(d[0]), to!int(d[1]), to!int(d[2]), to!int(d[3]), to!int(d[4]), to!int(d[5])];
  }

  foreach(d; data) {
    solve(d[0], d[1], d[2], d[3], d[4], d[5]);
  }  
}