// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004
#include <bits/stdc++.h>
using namespace std;

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

  scanf("%lf %lf %lf %lf %lf %lf", &a,&b,&c,&d,&e,&f);

  x = (e*c+(-b)*f)/(a*e-b*d);
  y = ((-d)*c+a*f)/(a*e-b*d);

  cout<<fixed; // ?°???°?????\??????????????????????????????????????????????????°???????????°??????????????????
  cout<<setprecision(3)<<fabs(x)<<" "<<fabs(y)<<endl;
  return EXIT_SUCCESS;
}