#include <stdio.h>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <iostream>
#include <algorithm>
#include <vector>
#include <list>
#include <deque>
#include <math.h>
using namespace std;
int main()
{
    //freopen("input.txt","r",stdin);
    double a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
        double r1=b*f-e*c,r2=b*d-a*e;
        double x=r1/r2;

        double y= (c-a*x)/b;

        printf("%.3lf %.3lf\n",x+0.0000001,y+0.0000001);
    }
    return 0;
}