#include<iostream>
#include<iomanip>

double shisyagonyu(double x){
  x += 0.0005;
  return x;
}

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

  while(std::cin >>a>>b>>c>>d>>e>>f){
    x = shisyagonyu((c*e-b*f)/(a*e-b*d));
    y = shisyagonyu((a*f-c*d)/(a*e-b*d));

    std::cout << std::fixed;
    std::cout << std::setprecision(3) << x;
    std::cout << " " << y << std::endl;
  }
}