#include "bits/stdc++.h" using namespace std; // コンテスト中のみ //#define int long long #define ll long long #define rep(i,n) for(int i = 0; i < (n); i++) #define P pair #define ld long double ll INF = (1LL << 60); int MOD = 1000000007; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); double a, b, c, d, e, f; double x, y; cin >> a >> b >> e >> c >> d >> f; double det = a * d - b * c; if (det == 0.0) { cout << "det = 0" << std::endl; } else { x = (d * e - b * f) / det; y = (-c * e + a * f) / det; cout << x <<" " << y << std::endl; } return 0; }