#include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
float A,B,C,D,E,F,X,Y;
while(cin>>a>>b>>c>>d>>e>>f){
C=c;
B=b;
A=a;
E=e*a/d;
F=f*a/d;
Y=(C-F)/(B-E);
X=(C-B*Y)/A;
cout<<X<<Y<<endl;
}
}