#include <iostream>
#include <iomanip>
#include <cstdio>
using namespace std;
 
int main()
{
    int a, b, c, d, e, f;
    cout << showpoint << setprecision(3);
    while (cin >> a >> b >> c >> d >> e >> f){
        double x = ((double)(b*f - c*e)) / (double)(b*d - a*e);
        double y = ((double)(c*d - a*f)) / (double)(b*d - a*e);
        printf(".3f .3f", &x, &y)
    }
    cout.flush();
}