#include <iostream>
#include <cstdio>
 
auto main () -> int
{
    long double a , b , c , d , e , f;
    while (std::cin >> a >> b >> c >> d >> e >> f)
    {
        auto delta = a * e - b * d;
        auto x = (e * c - b * f) / delta;
        auto y = (- c * d + a * f) / delta;
        std::printf ("%.3Lf %.3Lf\n" , x , y);
    }
}