#include <iostream>
#include <cstdio>
/*
 * 
   1  2  3  4  5  6
   2 -1 -2 -1 -1 -5  
 * 
 */
int main()
{
    double a,b,c,d,e,f;
    while(std::cin >> a >> b >> c >> d >> e >> f) 
    {
        double y = ( (c / a) - (f / d) ) / ( (b / a) - (e /d ));
        double x = ( c / a ) - ( b / a ) * y;
        printf("%.3f %.3f",x,y);
    }  
    return 0;
}