#include<iostream>
#include<iomanip>

using namespace std;

double solutionY();
double solutionX(double);
double a1,b1,c1,d1,e1,f1;

int main(){
  
  while(cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1){
    double x,y,xO,yO;
    
    y = solutionY();
    x = solutionX(y);
    
    cout <<fixed << setprecision(3) << x << " " << y ; 
  }
}

double solutionY(){
  double b,c,e,f;
  b = b1/a1;
  c = c1/a1;

  e = e1/d1;
  f = f1/d1;
  
  return (c - f)/(b - e);
}

double solutionX(double y){
  double b,c;
  b = b1/a1;
  c = c1/a1;
  
  return (c - b*y);
}