#include <cstdio>
#include <iostream>
#include <functional>
#include <algorithm>
#include <string>
#include <cstdarg>
#include <vector>
#include <map>
#include <cmath>

using namespace std;

namespace _{struct _{_(){ // initialize
  cin.tie(0); ios::sync_with_stdio(false);
}}_;}

template <typename T, size_t size>
inline size_t len(const T (&)[size]) { return size; }
inline void println(string s) { cout << s << '\n'; }
inline string format(const char* fmt, ...){
  int size = 512;
  char* buffer = 0;
  buffer = new char[size];
  va_list vl;
  va_start(vl, fmt);
  int nsize = vsnprintf(buffer, size, fmt, vl);
  if (size <= nsize) { //fail delete buffer and try again
    delete[] buffer;
    buffer = 0;
    buffer = new char[nsize+1]; //+1 for /0
    nsize = vsnprintf(buffer, size, fmt, vl);
  }
  string ret(buffer);
  va_end(vl);
  delete[] buffer;
  return ret;
}
#define str to_string
#define rep(i, n) for (int i=0; i<int(n); i++)
#define all(c) (c).begin(), (c).end()
#define max(a, b, c) max(max((a), (b)), (c))
#define min(a, b, c) min(min((a), (b)), (c))


// ax + by = c     || ax = c - by
// dx + ey = f
// x + (b/a)y = c/a
// x + (e/d)y = f/d
// (b/a - e/d)y = c/a - f/d
// y = (c/a - f/d) / (b/a - e/d)
// x = c/a - (b/a)y
int main() {
  double a, b, c, d, e, f;
  string ret = "";
  while (cin >> a >> b >> c >> d >> e >> f) {
    double x = 0, y = 0;
    if (a == 0) {
      y = b/c;
      x = f/d - e*y/d;
    }
    else if (d == 0) {
      y = e/f;
      x = c/a - b*y/a;
    }
    else if (b == 0) {
      x = c/a;
      y = f/e - d*x/e;
    }
    else if (e == 0) {
      x = f/d;
      y = c/b - a*x/b;
    }
    else {
      y = (c/a - f/d) / (b/a - e/d);
      x = c/a - (b/a)*y;
    }

    double a = round(x * 1000);
    double b = round(y * 1000);
    ret += format("%.3f %.3f\n",a / 1000, b / 1000);
  }
  cout << ret;
}