#include using namespace std; typedef long long ll; typedef pair P; /* 奇数、奇数 ... o,e,o,e, e,o,e,o 偶数、奇数 ... o,e,o,e e,o,e,o 奇数、偶数 ... o,e,o,e 偶数、偶数 ... e,e,e,e */ int main() { cin.tie(0); ios::sync_with_stdio(false); unsigned int a,b,x0,N; cin >> a >> b >> x0 >> N; if(a%2 == 1 && b%2 == 1){ if(x0%2 == 0) cout << N/2 << " " << 0 << endl; else cout << 0 << " " << N/2 << endl; }else if(a%2 == 0 && b%2 == 1){ if(x0%2 == 0) cout << N/2 << " " << 0 << endl; else cout << 0 << " " << N/2 << endl; }else if(a%2 == 1 && b%2 == 0){ if(x0%2 == 0) cout << N/2 << " " << 0 << endl; else cout << 0 << " " << N/2 << endl; }else{ if(x0%2 == 0) cout << 0 << " " << 0 << endl; else cout << N/2 << " " << N/2 << endl; } return 0; }