#include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;

double get(double a){
    if(abs(a) < 1e-9)return 0;
    return a;
}

int main(){
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double y = get((c-(a/d)*f)/(b-(a/d)*e));
        double x = get((c - b*y) / a);
        printf("%.3f %.3f", x,y);
        puts("");
    }
    return 0;
}