#include <bits/stdc++.h>
using namespace std;

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