#include <bits/stdc++.h>

using namespace std;
void fast_io() {
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
}

int main() {
    fast_io();
    int a, b, c, d, e, f;
    cin >> a >> b >> c >> d >> e >> f;
    int det = a * e - b * d;
    double x = (e * c - b * f) / (double)det;
    double y = (a * f - c * d) / (double)det;
    cout << setprecision(16) << fixed << x << " " << y << endl;
}