#include<iostream>
using namespace std;
int main(){
    float a,x,b,y,c,f,e,d;
    while(cin>>a>>b>>c>>d>>e>>f){
        x=(c-b*y)/c;
        x=(f-e*y)/d;
        y=(c-a*x)/b;
        y=(f-d*x)/e;
        cout<<x<<" "<<y<<endl;
    }
    
    return 0;
}