#include <iostream>

using namespace std;

int main(){
    double a,b,c,d,e,f,x,y;
    
    cin >> a >> b >> c >> d >> e >> f ;
    
    x=(c*e-b*f)/(a*e-d*b);
    y=(c*d-f*a)/(b*d-e*a);
    
    cout << x << " " << y << flush;
}