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

int main(){
  int a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f){
    double x,y;
    if(0 != a * e - d * b){
      x = 1.0 * (e * c - b * f)  / (a * e - b * d);
      y = 1.0 * (a * f - d * c)  / (a * e - b * d);
    }else{
      x = 0;
      y = 0;
    }
    printf("%lf %lf\n", x, y);
  }

}