#include using namespace std; int main() { long long a, b, x0, N; cin >> a >> b >> x0 >> N; long long ans = (N * 2 - 1 + 2) / 4; long long ans1 = 0; long long ans2 = 0; if( a % 2 == 0 ) { if( b % 2 == 0 ) { ans1 = ans; ans2 = ans; } } else { if( b % 2 == 0 ) { if( x0 % 2 == 0 ) { ans1 = ans; ans2 = ans; } } else { if( x0 % 2 ) ans1 = ans; else ans2 = ans; } } cout << ans1 << " " << ans2 << endl; }