#include<bits/stdc++.h>

using namespace std;

int main(){

  double x,y,a,b,c,d,e,f;

  while(cin >> a >> b >> c >> d >> e >> f){
    
    x = (c * e - b * f) / (a * e - b * d);
    y = (c * d - a * f) / (b * d - a * e);

    x += 0;
    y += 0;
    
    printf("%0.3lf",x);
    cout << " ";
    printf("%0.3lf",y);
    cout << endl;
    
  }

}

