#include<iostream>
#include<iomanip>
using namespace std;

int main(){
    double a,b,c,d,e,f;
    cin>>a>>b>>c>>d>>e>>f;

    double temp=b/e;
    double x,y;
    x=(c-temp*f)/(a-temp*d);
    temp=a/d;
    y=(c-temp*f)/(b-temp*e);
    cin>>a>>b>>c>>d>>e>>f;
    double x2,y2;
    temp=b/e;
    x2=(c-temp*f)/(a-temp*d);
    temp=a/d;
    y2=(c-temp*f)/(b-temp*e);


    cout.setf(ios::fixed);
    cout.precision(3);
    cout<<x<<" "<<y<<endl;
    cout<<x2<<" "<<y2;

    return 0;
}