#include <iostream>
#include <cstdio>
using namespace std;

int main(){
  double a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    if(b*f-c*e!=0&&a*e-d*b!=0)printf("%.3f %.3f\n",(d*b-e*a)/(b*f-c*e),(a*f-d*c)/(a*e-d*b));
    if(b*f-c*e==0&&a*e-d*b==0)printf("0.000 0.000");
    if(b*f-c*e==0)printf("0.000 %.3f\n",(a*f-d*c)/(a*e-d*b));
    if(a*e-d*b==0)printf("%.3f 0.000\n",(d*b-e*a)/(b*f-c*e));
  }
  return 0;
}