#include<iostream>
using namespace std;

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