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

double myRound(double base, int count){
  auto str = appender!string;
  formattedWrite(str, "%.*f", count - 1, base);
  return str.data.to!double;
}

void main(){
  string line;
  string[] lines;
  int i;

  while(true){
    string tmp = readln();
    if(tmp.length != 0){
      lines.length++;
      lines[i] = tmp;
    } else
      break;
  }
  
  foreach(eline; lines){
    string[] inputs = eline.chomp.split;
    double num[] = (string[] inputs){
      double[] tmp;
      tmp.length = inputs.length;
      foreach(i, elem; inputs)
        tmp[i] = elem.to!double;
      return tmp;
    }(inputs);

    double[] answer = (double[] num){
      return [
        (num[2] * num[4] - num[1] * num[5]) / (num[0] * num[4] - num[1] * num[3]),
        (num[5] * num[0] - num[2] * num[3]) / (num[0] * num[4] - num[3] * num[1])];
    }(num);

    if(answer[0] == cast(float)0)
      answer[0] = cast(float)0;
    writefln("%.3f %.3f",myRound(answer[0], 3), myRound(answer[1], 3));
  }
}