#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long int ll;

int main()
{
    double a,b,c,d,e,f;
while(cin >> a >> b >> c >> d >> e >> f){
double x=(f-c*e/b)/(d-a*e/b);
double y=(f-c*d/a)/(e-b*d/a);
cout << x << " " << y << "\n";
}
    return 0;
}