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