#include <bits/stdc++.h>

using namespace std;

typedef long long llint;

int main() {
  const llint m = pow(2, 32);
  llint a, b, x, n;
  cin >> a >> b >> x >> n;

  if (x % 2) {
    cout << 0 << " " << n / 2 << endl;
  } else {
    cout << 0 << " " << n / 2 << endl;
  }
  return 0;
}