#include <iostream>
using namespace std;
int main() {
    long a, b, x, n;
    cin >> a >> b >> x >> n;
    
    if (x % 2 == 0) {
        cout << 0 << ' ' << n / 2 << endl;
    } else {
        cout << n / 2 << ' ' << 0 << endl;
    }
}