/* All men have limits. They learn what they are and learn
   not to exceed them, I ignore mine. -Batman           */
#include <bits/stdc++.h>
//#include <iostream>
//#include <vector>
//#include <Windows.h>
using namespace std;

int main(){
int a,b,c,d,e,f;
while(cin>>a>>b>>c>>d>>e>>f){
	
	printf("%.3lf %.3lf\n",(double)(c*e-f*b)/(a*e-d*b),(double)(c*d-f*a)/(b*d-e*a));
		
}
return 0;
}