
/*
 * main.cpp
 *
 *  Created on: 2011/04/01
 *      Author: satoki
 *      22:08 ~ 04/09 10:51
 *      »ê¼êÆ§Åððo·
 */
#include <iostream>
#include <string.h>
using namespace std;

double dA;
double dB;
double dC;
double dD;
double dE;
double dF;

double dX;
double dY;

bool input() {
  if (scanf("%lf %lf %lf %lf %lf %lf", &dA, &dB, &dC, &dD, &dE, &dF) == EOF) return false;
  return true;
}

void manage() {
  int tmp;

  dX = (dC * dE - dB * dF) / (dA * dE - dB * dD);
  dY = (dC * dD - dA * dF) / (dB * dD - dA * dE);

  tmp = (int)dX;
  dX -= tmp;
  dX = (int)(dX * 1000 + 0.5 - (dX < 0)) / (double)1000;
  dX += tmp;
  tmp = (int)dY;
  dY -= tmp;
  dY = (int)(dY * 1000 + 0.5 - (dY < 0)) / (double)1000;
  dY += tmp;
}

int main() {
  while (1) {
    if (!input()) break;
    manage();
    printf("%.3f %.3f\n", dX, dY);
  }
}