#include<iostream>
#include<iomanip>

using namespace std;

int main(){

double x, y, a, b, c, d, e, f;

while(cin >> a >> b >> c >> d >> e >> f){

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

cout << setprecision(4) << x << " " << y;
}
}