#include using namespace std; typedef long long int ll; typedef pair P; typedef vector VI; typedef vector VVI; const ll MOD = 1000000007; const ll INF = 1e18; #define REP(i, n) for(int i = 0; i < n; i++) #define ALL(v) v.begin(), v.end() int main(){ double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; double p=(double)d/a; b*=p; c*=p; double ans2=(f-c)/(e-b); double ans1=(f-(ans2*e))/d; cout << ans1 << ' ' << ans2 << endl; return 0; }