#include <iostream>
#include <iomanip>
using namespace std;
int main(void){
    int a,b,c,d,e,f,g,x,y;
    double ansX,ansY;
    while(std::cin >> a >> b >> c >> d >> e >> f ){
        y = - d * b;
        y += e;
        g = d * c;
        g *= -1;
        g += f;
        
        if(g != 0 && y != 0)
            ansY = g / y;
        else
            ansY = 0;
            
        x = b * ansY;
        x *= -1;
        
        ansX = c + x;
        
        std::cout<< fixed<< setprecision( 3 )<< ansX<< " "<<ansY<< std::endl;
    }
    return 0;
}