#include<iostream>
int gcd(int x,int y){
	if(y==0)return x;
	else return gcd(y,x%y);
}
int main(){
	while(1){
		double a,b,c,d,e,f;
		std::cin>>a>>b>>c>>d>>e>>f;
		double b2=b*gcd(a,d)/a;
		double e2=e*gcd(a,d)/d;
		double c2=c*gcd(a,d)/a;
		double f2=f*gcd(a,d)/d;
		double y=(f2-c2)/(e2-b2);
		double x=(e-b*y)/a;
		std::cout<<x<<" "<<y<<std::endl;
		break;
	}
	return 0;
}