#include <iostream>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <string>

using namespace std;

vector<double> split(string str)
{
  vector<double> vec;
  string s;

  for(int i = 0; i < str.size(); ++i){
    s = "";
    while(i < str.size() && str[i] != ' ') s += str[i++];
    if(s.size()) vec.push_back(atof(s.c_str()));
  }

  return vec;
}

int main()
{
  string str;
  vector<double> vec;
  double t, r1, r2;

  while(getline(cin, str)){
    vec = split(str);
    t = vec[0]*vec[4]-vec[1]*vec[3];
    r1 = (vec[2]*vec[4]-vec[1]*vec[5])/t;
    r2 = (vec[0]*vec[5]-vec[2]*vec[3])/t;
    if(r1 == -0.0) r1 = 0.0;
    if(r2 == -0.0) r2 = 0.0;
    printf("%.3lf %.3lf\n", r1, r2);
  }

  return 0;
}