#include <iostream>
using namespace std;

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