#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; double x = (double)(c * e - f * b) / (a * e - b * d); double y = (double)(c * d - a * f) / (b * d - a * e); cout << fixed << setprecision(15) << x << " " << y << "\n"; return 0; }