#include <bits/stdc++.h>

using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double det = a * e - b * d;
    double x = e * c / det - b * f / det;
    double y = a * f / det - d * c / det;
    cout << fixed;
    cout << setprecision(3) << x << " " << setprecision(3) << y << endl;
  }
}
