#include <iostream>
#include <stdio.h>
int main()
{
    double a , b , c , d , e , f ;
    while ( std :: cin >> a >> b >> c >> d >> e >> f )
    {
        printf ("%.3lf %.3lf\n" , ( a*e*c - b*a*f ) / ( a*a*e - a*b*d ) , ( a*f - d*c ) / ( a*e - b*d ) ) ;
        //std :: cout << ( a*e*c - b*a*f ) / ( a*a*e - a*b*d ) << ' ' << ( a*f - d*c ) / ( a*e - b*d ) << std :: endl ;
    }
}