import std.stdio,
      std.array,
      std.conv,
      std.string,
      std.algorithm;

/// 0:a 1:b 2:c 3:d 4:e 5:f
void main(){
  string s;
  for(;;){
    s=readln();
    if(stdin.eof()) break;
    string[] input = split(s);
    double[] params = new double[6];
    for(int j = 0; j < 6;j++){
      params[j] = to!double(input[j]);
    }
    double bai = params[0] / params[3];
    double y =  (params[2] - params[5]*bai) / (params[1] - params[4]*bai);
    double x = (params[2] - params[1]*y) / params[0];
    writef("%.3f %.3f\n",x,y);
  }
}