#include <iostream>                                             
#include <cstdio>                                               
#include <cmath>                                                
using namespace std;                                            
                                                                
int main() {                                                    
  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;                                       
    x = round(1000*x)/1000;                                     
    y = round(1000*y)/1000;                                     
    if (x==0) {                                                 
      x = 0;                                                    
    }                                                           
    if (y==0) {                                                 
      y = 0;                                                    
    }                                                           
    printf("%.3f %.3f\n", x, y);                                
  }                                                             
  return 0;                                                     
}                                                               
                           