#include<bits/stdc++.h>
using namespace std;
int main()
{
    double a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
            double x=(c*e-b*f)/(a*e-d*b);
    double y=(a*f-c*d)/(a*e-d*b);
    cout << fixed;
    cout << setprecision(3);
    cout << x <<" "<< y << endl;
    }

}