#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
   int a,b,p,c,d,q;
   float x,y;
   while(cin >> a >> b >> c >> d >> e >> f)
   {
      x=(float)(d*p-b*q) / (a*d - b*c);
      y=(float)(a*q-c*p) / (a*d - b*c);
      x *= 1000;
      x +=0,5;
      x = (int)x;
      x /= 1000;
      y *= 1000;
      y +=0,5;
      y = (int)x;
      y /= 1000;
      printf("%.3f %.3f\n" ,x,y);
   }
    return 0;
}