#include<iostream>
using namespace std;

int main(){
int a,b,c,d,e,f,Ax,Ay;
float x,y;
while(cin>>a>>b>>c>>d>>e>>f){
x=(c*e-b*f)/(a*e-b*d);
y=(c*d-a*f)/(b*d-a*e);
Ax=x*100000;
Ay=y*100000;
Ax+=5;
Ay+=5;
Ax/=10;
Ay/=10;
cout<<x<<" "<<y<<endl;}
}