#include<iostream>
#include<cstdio>
#include<iomanip>
#include<vector>
using namespace std;
class SimultaneousEquation{ 
    public:
        void solve(vector<int> abcdef){ 
            double x,y;
            for(x=-1000;x<=1000;x++){ 
                for(y=-1000;y<=1000;y++){ 
                    if(abcdef[0]*x+abcdef[1]*y==abcdef[2]&&abcdef[3]*x+abcdef[4]*y==abcdef[5])printf("%.3lf %.3lf\n",x,y);
                }
            }
        }
};
int main(){ 
    vector<int> abcdef(6);
    while(cin>>abcdef[0]>>abcdef[1]>>abcdef[2]>>abcdef[3]>>abcdef[4]>>abcdef[5]){
        SimultaneousEquation inst;
        inst.solve(abcdef);
    }
}