#include <iostream>

int main()
{
        int a, b, c, d, e, f;
        double y;
        std::cout.precision(3);
        std::cout.setf(std::ios::fixed);
        while(std::cin >> a >> b >> c >> d >> e >> f)
        {
                if(a != 0)
                {
                        y = (f - d*c/(double)a)/(e - d*b/(double)a);
                        std::cout << (c - b*y)/a << " " << y << std::endl;
                }
                else
                {
                        y = c/(double)b;
                        std::cout << (f - e*y)/d << " " << y << std::endl;
                }
        }
        return 0;
}