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

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

}