#include <iostream>
#include <iomanip>
#include <cmath>
int main(void)
{
    double a,b,c,d,e,f;
    double x,y;
    std::cout << std::showpoint << std::setprecision(4);
    while(std::cin >> a >> b >> c >> d >> e >> f){
        x = (c * e - b * f) / (a * e - b * d) * 1000;
        x = (x >= 0.0 ? std::floor(x + 0.5) : std::ceil(x - 0.5)) / 1000;;
        y = (f * a - c * d) / (a * e - b * d) * 1000;
        y = (y >= 0.0 ? std::floor(y + 0.5) : std::ceil(y - 0.5)) / 1000;
        std::cout << x << " " << y << std::endl;
    }
    return 0;
}