#include<bits/stdc++.h>
using namespace std;
int main(){
  double a,b,c,d,e,f,a2,b2,c2,d2,e2,f2,e3; // ax+by=c  dx+ey=f
  while(cin >> a >> b >> c >> d >> e >> f){
    a2=a;
    b2=b;
    c2=c;

    a/=b;
    c/=b;
    a*=(-1);
    c*=e;
    a*=e;
    a+=d;
    f-=c;
    double ansx=f/a;
    printf("%.3f ",ansx);
 
    a2*=ansx;
    c2-=a2;
    double ansy=c2/b2;
    printf("%.3f\n",ansy);
  }
  return 0;
}