#include <iostream>
#include <iomanip>
int main(void)
{
    double a,b,c,d,e,f;
    int 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 + 0.5);
        y = ((f * a - c * d) / (a * e - b * d) * 1000 + 0.5);
        std::cout << x / 1000.0 << " " << y / 1000.0 << std::endl;
    }
    return 0;
}