#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;
int main() {
    float a,b,c,d,e,f,x;
    while(cin >> a){
        cin >> b;
        cin >> c;
        cin >> d;
        cin >> e;
        cin >> f;
        a /= b;
        c /= b;
        x = (f-e*c)/(d-a*e);
        printf("%.3f %.3f\n",x,c-a*x );

    }
    return 0;

}