#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; int g = __gcd(a, d); int lc = a / g * d; b *= lc / a; c *= lc / a; e *= lc / d; f *= lc / d; int yd = (b - e); int vd = (c - f); long double y = (long double)vd / yd; long double x = (c - b * y) / lc; cout << fixed << setprecision(15) << x << " " << y << newl; return 0; }