#include <stdio.h>

main() {
  double a,b,c,d,e,f;
  double x,y;
  while(scanf("%lf %lf %lf",&a,&b,&c)) {
    scanf("%lf %lf %lf",&d,&e,&f);
    b/=a; c/=a; a=1; a*=d; b*=d; c*=d;
    a=0; b-=e; c-=f; c/=b;

    e/=d; f/=d; d=1; f = f-e*c;
    //printf("%lf %lf %lf %lf %lf %lf\n",a,b,c,d,e,f);
    printf("%.3lf %.3lf\n",f,c);
  }
}