#include <iostream>
#include <cstdio>

int main()
{
        using namespace std;
        double a,b,c,d,e,f;

        while(cin >> a >> b >> c >> d >> e >> f){
                printf("%.3f %.3f",(c*e-b*f)/(a*e-d*b),(a*f-d*c)/(a*e-d*b));
        }

        return 0;
}