#include <vector>
#include <iostream>
#include <set>
#include <cstdio>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <tuple>
#include <algorithm>
#include <limits>
#include <map>

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;

int main() {
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double det = a*e-b*d;
        double r1 = (e*c-b*f)/det;
        double r2 = (-d*c+a*f)/det;
        printf("%.3f %.3f\n", r1, r2);
    }
    return 0;
}