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

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