#include<iostream>
#include<cstdio>
#include <iomanip>

using namespace std;

int main(){
	
	float a, b, c, d, e, f;
	float x, y;
	
	cin >> a >> b >> c >> d >> e >> f;
	
	y = ((c * d) - (a * f)) / ((b * d) - (a * e));
	x = ((c * e) - (b * f)) / ((a * e) - (b * d));
	
	cout << fixed << setprecision(3) << x  << "," << y << endl;
	
	return 0;
}
