#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f){
    printf("%.3f %.3f\n", (c - ((b * f) / e)) / (a - ((b * d) / e)), (c - ((a * f) / d)) / (b - ((a * e) / d)));
  }

  return 0;
}