#include <cstdio>

using namespace std;

int main()
{
    //freopen("input.txt", "r", stdin);
    int a, b, c, d, e, f;
    while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f)==6){
        double x, y;
        x = ((b*f)-(c*e))/((b*d)-(a*e));
        y = (c-(a*x))/b;

        printf("%0.3lf %.3lf\n", x, y);
    }

    return 0;
}