/**********************************************************
Status:
Problem:
Author:     Md. Shahidul Islam,
            Department of Computer Sciemce and Engineering,
            Begum Rokeya University, Rangpur, Bangladesh
Created on:
***********************************************************/

#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define vi vector<int>
#define ll long long
#define eps 1e-6
int main()
{
    //freopen("d.txt", "r", stdin);
    int a,  b, c, d, e, f;
    double x, y;
    while(scanf("%d %d %d", &a, &b, &c)!=EOF)
    {
        scanf("%d %d %d", &d, &e, &f);
        
        y=(double)((c*d-a*f)/(b*d-a*e));
        x=(double)((c-b*y)/a);
        printf("%.3lf %.3lf\n", x, y);
    }
    return 0;
}
/**********************************************************
About this problem:

************************************************************/