#include <iostream>
#include <cstdio>

using namespace std;

int main(){
double a, b, c, d, e, f;

cin >> a >> b>> c>> d>> e>> f;

double x, y;
x =(c*e-b*f) / (a*e-b*d);
y = (c*d-a*f) / (b*d-a*e);

printf("%.3d %.3d\n",x, y);

return 0;
}