#include <stdio.h>

int main(void) {
  double a, b, c, d, e, f;
  while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) {
    double ee = e / b, dd = d / a;
    double ax = a * ee, cx = c * ee;
    printf("%f ", (cx - f) / (ax - d));
    b *= dd, c *= dd;
    printf("%f\n", (c - f) / (b - e));
  }
  return 0;
}
