#include<iostream>
#include<iomanip>

int main(){
        double a,b,c,d,e,f;
        while(std::cin >> a >> b >> c >> d >> e >> f){
                double x, y;
                x = (b*f-e*c)/(b*d-e*a);
                y = (c-a*x)/b;
                std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
        }
        return 0;
}