#include<iostream>
#include<stdio.h>
#include<stdlib.h>

using namespace std;

double s( double v, int pr ){
    double    r;
    char    b[256] = {'\0'};
    char    *p;
    sprintf( b, "%.*f", pr, v);
    r = strtod( b, &p );
    return r;
}

int main(void){
  double a,b,c,d,e,f,g,h;
  cin >> a >> b >> c >> d >> e >> f;
  while(!cin.eof()){
  g = (c*e-f*b)/(a*e-d*b);
  h = (a*f-d*c)/(a*e-d*b);
  g = s(g,3);
  h = s(h,3);
  printf("%.3f %.3f\n",g,h);
  cin >> a >> b >> c >> d >> e >> f;
  }
  return 0;
}