#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    float a,b,c,d,e,f,x,y=0;
    
    while(cin >> a >> b >> c >> d >> e >> f){
    y=(d*c-a*f)/(d*b-a*e);
    x=(f-e*y)/d;
    
    printf("%.3f %.3f\n",x,y);
    }
}