#include <stdio.h>

/* INPUT TYPE:
** Ax + By = C
** Dx + Ey = F
*/

int main(){
  float A, B, C, D, E, F, ans_x, ans_y = 0;
  scanf("%f %f %f %f %f %f", &A, &B, &C, &D, &E, &F);

  // x?????????AD???
  B = B*D;
  C = C*D;
  E = E*A;
  F = F*A;


  ans_y = (C-F) / (B-E);
  ans_x = (C-B*ans_y) / (A*D);

  printf("%.3f %.3f\n", ans_x, ans_y);

  return 0;
}