#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

int main(void) {
  string input;
  while (getline(cin, input)) {
    float a, b, c, d, e, f;
    sscanf(input.c_str(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f);
    float x = (c*e-b*f)/(a*e-b*d);
    float y = (c*d-a*f)/(b*d-a*e);
    printf("%.3f %.3f\n", x, y);
  }
}