import std.stdio;
import std.conv;
import std.string;

const int DATA = 200;

int main() {
  int i=0;
  //float[DATA][2] result;// = new float[DATA][2];
  while(true) {
    //ax + by = c   dx + ey = f
    //0    1    2   3    4    5
    string[] input = (chomp(readln)).split(" ");
    if(stdin.eof()) break;
    
    // |a b|
    // |d e|
    float[][] lmat = [[to!(float)(input[0]), to!(float)(input[1])], [to!(float)(input[3]), to!(float)(input[4])]];
    float[] rmat = [to!(float)(input[2]), to!(float)(input[5])];
    float[][] revmat = [[to!(float)(input[4]), -to!(float)(input[1])], [-to!(float)(input[3]), to!(float)(input[0])]];
    float ad_bc = lmat[0][0]*lmat[1][1] - lmat[0][1]*lmat[1][0];

    float x = (revmat[0][0]*rmat[0]+revmat[0][1]*rmat[1]) / ad_bc + 0.0;
    float y = (revmat[1][0]*rmat[0]+revmat[1][1]*rmat[1]) / ad_bc + 0.0;
    writef("%.3f %.3f\n",x, y);
      //i++;
  }
// 
//  for(int j=0; j<i; j++) {
//    writef("%.3f %.3f\n",result[j][0], result[j][1]);
//  }

  return 0;
}