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

int main(){
	double a,b,c,d,e,f,x,y;
	while(cin >> a >> b >> c >> d >> e >> f){
		if(!b){
			x=c/a;
			y=(f-d*x)/e;
		}else if(!e){
			x=f/d;
			x=(f-b*y)/a;
		}else if(!a){
			y=c/b;
			x=(f-e*y)/d;
		}
		else if(!d){
			y=f/e;
			x=(c-b*y)/a;
		}else{
			b/=a;c/=a;a/=a;
			e/=d;f/=d;d/=d;
			double high,low;
			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;
				}
			}
			x = c-b*y;
		}
		printf("%.3lf %.3lf\n",x,y);
	}
}