#include <iostream>

using namespace std;

int main()
{
	double	x,a,b,c,d,e,f;
	cin >> a >> b >> c >> d >> e >> f;
	//a*x-b*d*x/e =c-b*f/e
	for(x=-1000000;x<1000000;x++)
	{
		if(a*(x/1000)+b*((f-d*(x/1000))/e) == c)
		{
			printf("%0.3lf ",x/1000);
			break;
		}
	}
	
	printf("%0.3lf",(f-d*x/1000)/e); //yÌoÍ
}