#include<iostream>
#include<iomanip>
#include<cstdio>
using namespace std;
int main(){
  double a,b,c,d,e,f;
  double x=0.0,y=0.0;
  while(cin>>a>>b>>e>>c>>d>>f){
    x=(d*e-b*f)/(a*d-b*c);
    y=(a*f-c*e)/(a*d-b*c);
    printf("%.3f %.3f\n",x,y);
  }
  return 0;
}