#include<iostream>
#include<cmath>
#include<iomanip>
double pow(double x,double y);
using namespace std;
int main(){
  double a,b,c,d,e,f,x,y,g,z,aa,bb;
  while(cin>>a){
    cin>>b>>c>>d>>e>>f;
    g=b;
    z=c;
    c*=d;
    b*=d;
    e*=a;
    f*=a;
    b-=e;
    c-=f;
    y=c/b;
    g*=y;
    z-=g;
    x=z/a;
    aa=round(x);
    bb=round(y);
    cout<<fixed;
    cout<<setprecision(3)<<aa<<' '<<setprecision(3)<<bb<<' '<<endl;
  }
  return(0);
}