#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
typedef long long ll;
int main(void)
{
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f)
    {
        double y = (c*d - a*f) / (b*d - a*e);
        double x = (c - b*y) / a;
        printf("%.3lf %.3lf\n", x, y);
    }
}
