#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include<algorithm>
#define pf printf
#define sf scanf
#define wh while
#define db double
#define LL long long
#define _USE_MATH_DEFINES
#define re(i,a,b) for(int i=a;i<b;i++)
#define rev(i,a,b) for(int i=a;i>=b;i--)

using namespace std;

int main()
{
    db a,b,c,d,e,f,x;
    wh(cin>>a>>b>>c>>d>>e>>f){
        db q=(b/a)*d*(-1);
        db r=(c/a)*d*(-1);
        db y=((r+f)/(q+e));
        db p=e*y;
        if(p==f)x=0;
        else x=(f-p)/d;
        pf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}