#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = round((e * c - b * f) / (e * a - b * d) * 1000) / 1000;
        double y = round((c - a * x) / b * 1000) / 1000;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}