#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)
#define MP make_pair

double rou(double d){
  if( abs(d) < 0.0001)
    return 0.0;
  return d;
}

int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(3);

  int INF = 1000000;

  int a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    cout << rou((double)(c*e-b*f)/(a*e-b*d)) << " "
	 << rou((double)(c*d-a*f)/(b*d-a*e)) << endl;
  }


  return 0;
}