#include using namespace std; int main() { const int64_t m = 1l << 32; int64_t a, b, x0, n; cin >> a >> b >> x0 >> n; assert(0 <= a && a < m); assert(0 <= b && b < m); assert(0 <= x0 && x0 < m); assert(0 <= n && n < m); assert(a % 4 == 1); assert(b % 2 == 1); if (x0 % 2) { cout << n / 2 << " " << 0 << endl; } else { cout << 0 << " " << n / 2 << endl; } }