#include <iostream>
#include <cstdio>

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