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

using namespace std;

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