#include <iostream>
using namespace std;

int main(){
  int n[6];
 
  while(cin>>n[0]>>n[1]>>n[2]>>n[3]>>n[4]>>n[5]){

  float a,b,c;
  float x,y;
  a = (float)n[0]/(float)n[3];
  b = -n[4]*a;
  c = -n[5]*a;
  
  a = n[1] + b;
  b = n[2] + c;
  y = b/a;
  x = (n[2]-n[1]*y)/n[0];

  cout << x << ' ' << y << endl;
}
  return 0;
}