#include<iostream>
#include<iomanip>

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