/**
 *    AUTHOR:    crypter472                    
 *   CREATED:   21.04.2020 20:33:09  
**/

#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEFINE
#include "../../DEBUG.hpp"
#endif

const double eps = 1e-3;

int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(3);
  cout << fixed;
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double x = (b * f - c * e) / (b * d - a * e);
    double y = (d * c - a * f) / (b * d - a * e);
    if (abs(x) <= eps) x = abs(x);
    cout << x << " " << y << '\n';
  }
  return 0;
}


