#include<iostream>
#include<iomanip>
#include<cstdio>

using namespace std;

int main(){

  float a, b, c, d, e, f;
  float temp;
  float x, y;

  cin >> a >> b >> c >> d >> e >> f;

  temp = a/d;
  d = d*temp;
  e = e*temp;
  f = f*temp;
  b = b-e;
  c = c-f;
  y = c/b;
  x = (f-e*y)/d;

  cout << fixed << setprecision(3) << x << " " << y << "\n";

  return 0;
}