#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
  double a,b,c,d,e,f;
  double x=-1001,y=-1001;
  while(cin >> a >> b >> c >> d >> e >> f){
    for(double i=-1000;i<=1000;i=i+0.0001){
      for(double j=-1000;j<=1000;j=j+0.0001){
	if(a*i+b*j==c && d*i+e*j==f){
	  x=i;
	  y=j;
	}
      }
    }
      printf("%.3lf",x);
      cout << " ";
      printf("%.3lf",y);
      cout << endl;
  }
  return 0;
}