#include <iostream>
#include <cstdio>
using namespace std;
int main( void )
{
  int a,b,c,d,e,f;
  double x,y;
  while( 1 ){
    cin >> a >> b >> c >> d >> e >> f;
    if( cin.eof() ) break;
    x = (double)(c*e-b*f) / (a*e-b*d);
    y = (double)(a*f-c*d) / (a*e-b*d);
    if( x <= 0 && -0.0005 < x ) x = 0;
    if( y <= 0 && -0.0005 < y ) y = 0;
    printf( "%.3lf %.3lf\n", x, y );
  }
  return 0;
}