#include <iostream>
using namespace std;

int main(void){
    double a, b, c, d, e, f;
    
    cin >> a >> b >> c >> d >> e >> f;
    
    b = b / a;
    c = c / a;
    a = a / a;          //a = 1
    
    e = e - d*b;
    f = f - d*c;
    d = d - d*a;        //d = 0
    
    f = f / e;
    e = e / e;          //e = 1
    
    c = c - b*f;
    b = b - b*e;
    
    printf("%.3f %.3f",c , f);
}