#include<iostream>
#include<cstdio>
using namespace std;
double A,B,C,D,E,F;
int main()
{
 while(cin >> A >> B >> C >> D >> E >> F){
  printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
 }
 return 0;
}