#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <cmath>
#include <cfloat>

#define FOR(i,b,n) for(int i=b;i<n;i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define INF 1<<25

using namespace std;

double a,b,c,d,e,f,x,y;

int main()
{
	while( cin >> a >> b >> c >> d >> e >> f, !cin.eof())
	{
		b /= a; c /= a; a = 1.0;
		e /= d; f /= d; d = 1.0;
		
		y = (c-f)/(b-e);
		x = c-b*y;

		printf("%.3lf %.3lf",x,y);

	}

	return 0;
}