#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <iterator>
#include <cmath>
#include <stack>
#include <functional>
#include <iomanip>
using namespace std;

int main()
{
  double a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f, !cin.eof()) {
    double x,y;
    x = 1/(a*e-b*d)*(e*c-b*f);
    y = 1/(a*e-b*d)*((-d)*c+a*f);
    cout << fixed << setprecision(3) << x << ' ' <<   y << endl;
  }

  return 0;
}