#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
  double a,b,c,d,e,f;

  while(1){
    cin >> a >> b >> c >> d >> e >> f;
    if(cin.eof())break;

    double x = (f*b-c*e)/(b*d-a*e);
    double y = (c - a*x)/b;
    printf("%.3f %.3f\n",x,y);
  }
}