#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double m[2][2],ans[2],rev[2][2];
  while(cin >>m[0][0]>>m[0][1]>>ans[0]>>m[1][0]>>m[1][1]>>ans[1]){
    double det = m[0][0]*m[1][1]-m[0][1]*m[1][0];
    rev[0][0] = m[1][1]/det;
    rev[0][1] = -m[0][1]/det;
    rev[1][0] = -m[1][0]/det;
    rev[1][1] = m[0][0]/det;
    double x = ans[0]*rev[0][0]+ans[1]*rev[0][1];
    double y = ans[0]*rev[1][0]+ans[1]*rev[1][1];
    printf("%.3lf %.3lf\n",x,y);
  }
  return 0;
}