#include <iostream>
#include <vector>
#include <cstdio>

using namespace std;

pair<double, double> solve(int a, int b, int c, int d, int e, int f){
  pair<double, double> ans;
  ans.first = (double)(f * b - c * e) / (double)(b * d - a * e);
  ans.second = (double)(c * d - a * f) / (double)(b * d - a * e);

  return ans;
}

int main(){
  int a, b, c, d, e, f;
  vector< pair<double, double> > ans;

  while(cin >> a &&
	cin >> b &&
	cin >> c &&
	cin >> d &&
	cin >> e &&
	cin >> f){
    ans.push_back(solve(a, b, c, d, e, f));
  }

  for(int i = 0; i < ans.size(); i++){
    printf("%.3f %.3f\n", ans[i].first, ans[i].second);
  }
  
  return 0;
}