// 20151005
// ??????????????\????????¶?????????




#include<stdio.h>




int main() {
  double a, b, c; // ??? 1 ????????°
  double d, e, f; // ??? 2 ????????°




  /* ??\??? */
  while ((scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)) != EOF) {
    /** ??¶?´??????? **/
    if (a < -1000 && a > 1000) break;
    if (b < -1000 && b > 1000) break;
    if (c < -1000 && c > 1000) break;
    if (d < -1000 && d > 1000) break;
    if (e < -1000 && e > 1000) break;
    if (f < -1000 && f > 1000) break;
    /*** ??????????????? ***/
    /**** (1, 1) ??? 1 ??? ****/
    b = b / a;
    c = c / a;
    a = a / a; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */
    /***** (2, 1) ??? 0 ???*****/
    e = e - b * d;
    f = f - c * d;
    d = d - a * d; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */




    /**** (2, 2) ??? 1 ??? ****/
    d = d / e;
    f = f / e;
    e = e / e; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */
    /***** (1, 2) ??? 0 ???*****/
    a = a - d * b;
    c = c - f * b;
    b = b - e * b; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */




    /* ??¨??? */
    printf("%0.3f %0.3f", c, f);
  }
			



  /* ?????? */
  return 0;
}