#include<iostream>
using namespace std;

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