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