#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
 int cn=0;
 double a,b,c,d,e,f,i;
 vector<double> x,y;
 while(cin >> a >> b >> c >> d >> e >> f) {
	 y.push_back((c-f*a/d)/(b-e*a/d));
	 x.push_back((c-b*y[cn++])/a);
	 }
 for (i=0;i<cn;i++) printf("%.3f %.3f\n",x[i],y[i]); 
 return 0;
}