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

int main()
{
    double a,b,c,d,e,f;

    cin >> a >> b >> c >> d >> e >> f;

    double A = a*e-b*d;
    double ans1, ans2;
    ans1 = (c*e - b*f)/A;
    ans2 = (-c*d + a*f)/A;
    if(ans1<0.0005 && ans1> -0.0005) ans1 = 0;
    if(ans2<0.0005 && ans2> -0.0005) ans2 = 0;

    printf("%1.3f %1.3f\n",ans1,ans2);

    return 0;
}