#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<iostream>
#include<climits>
#define sc scanf
#define pf printf
#define si(a) scanf("%d",&a)
#define sd(a) scanf("%lf",&a)
#define sl strlen
#define nl printf("\n")
#define f0(i,a) for(__typeof(a)i=0;i<a;i++)
#define f1(i,a) for(__typeof(a)i=1;i<=a;i++)
#define fa0(i,a) for(__typeof(a)i=a;i>=0;i--)
using namespace std;
int main()
{
    int a, b,c,d,e,f;
    while(sc("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f)!=EOF)
    {
        double niche= (a*e)-(b*d);
        double x=(c*e)-(f*b);
        double y=(a*f)-(c*d);
        pf("%.3lf %.3lf\n", (x/niche), (y/niche));
    }
    return 0;
}