#include using namespace std; typedef long long ll; typedef pair l_l; typedef pair i_i; template inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } template inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } return false; } const long double EPS = 1e-10; const long long INF = 1e18; const long double PI = acos(-1.0L); //const ll mod = 1000000007; int main() { //cout.precision(10); cin.tie(0); ios::sync_with_stdio(false); ll a, b, x, N; cin >> a >> b >> x >> N; assert(a % 4 == 1); assert(b % 2 == 1); if(x & 1) { cout << N / 2 << " 0" << endl; } else { cout << "0 " << N / 2 << endl; } return 0; }