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

using namespace std;

int main(){
  while(1){
  double a,b,c,d,e,f;
  double x,y;

  cin >> a >> b >> c >> d >> e >> f;
  x = ( c * e - b * f ) / ( a * e - b * d );
  y = ( c - a * x ) / b;
  printf("%.3f %.3f\n", x, y);
  }
}