#include <iostream>
using namespace std;


int main() {
  float a, b, c, d, e, f;
  float x, y;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    x=(b*f-c*e)/(b*d-a*e);
    cout<<x;
    cout<<" ";
    
    y=(c*d-a*f)/(b*d-a*e);
    cout<<y;
    cout<<endl;
  }
  
  return 0;
}