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