#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		b/=a;c/=a;a/=a;
		e/=d;f/=d;d/=d;
		double high,low,y;
		high=1000.0;low=-1000.0;
		while(f+(b-e)*y!=c){
			y=(high+low)/2.0;
			if(f+(b-e)*y<c){
				if(b-e>=0)low = y;
				else high = y;
			}else if(f+(b-e)*y>c){
				if(b-e>=0)high = y;
				else low = y;
			}else{
				break;
			}
		}
		printf("%.3lf %.3lf\n",c-b*y,y);
	}
}