#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;
}