#include <iostream>
using namespace std;

int main(){
  int i;
  float x[6];
  int y1, y2, re1, re2;

  while(cin >> x[0]){
    for(i=1; i<6; i++){
      cin >> x[i];
    }

    //normalize
    x[1]/=x[0]; x[2]/=x[0]; x[0]=1;

    //subtraction
    x[4]-=x[3]*x[1]; x[5]-=x[3]*x[2]; x[3]=0;

    //normalize
    x[5]/=x[4]; x[4]=1;

    //subtraction
    x[2]-=x[1]*x[5]; x[1]=0;

    y1=(int)(x[2]*10000); y2=(int)(x[5]*10000);
    re1=y1%10; re2=y2%10;
    if(re1<5) y1-=re1;
    else y1+=10-re1;
    if(re2<5) y2-=re2;
    else y2+=10-re2;
    printf("%f %f\n", (float)y1/10000.0f, (float)y2/10000.0f);
  }

  return 0;
}