#include<iostream>
#include<cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main()
{
    while(1)
    {
    double a,b,c,d,e,f;
    cin >> a;
    if(cin.eof())break;
    cin >> b;
    cin >> c;
    cin >> d;
    cin >> e;
    cin >> f;
    double det = a*e-b*d;
    double ans1 = (c*e-b*f)/det;
    if(ans1==-0.0)ans1 = -ans1;
    double ans2 = (-c*d+a*f)/det;
    if(ans2==-0.0)ans2 = -ans2;
    printf("%1.3f %1.3f\n",ans1,ans2);
    }
    return 0;
}