#include <cstdio>
using namespace std;

int main()
{
    double a,b,c,d,e,f;
    while (scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF) {
        double y = (f+-d*c)/(-b*d+e);
        double x = (c-b*y)/a;
        printf("x = %.3f y = %.3f\n",x,y);
    }
    return 0;
}