#include <cstdio>
#include <cmath>

double r(double d){
  double a = roundl(d*1000);
  if(a==0) return +0.0;
  return a/1000;
}

int main(){
  double a,b,c,d,e,f;
  while(~scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))
    printf("%.3f %.3f",r((c*e-b*f)/(a*e-b*d)),r((-c*d+a*f)/(a*e-b*d)));
}