#include<iostream>
#include<stdio.h>
#include<iomanip>
using namespace std;
int main()
{
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f)
    {

    cout<<setprecision(3)<<fixed;
    x=((-b*f)+(c*e))/(a*e-b*d);
    y=(-c*d+a*f)/(a*e-b*d);
    cout<<x<<" "<<y<<endl;
    }



    return 0;
}