#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define mod(mod_x) ((((long long)mod_x+modulo))%modulo)
#define Inf 1000000000

int main(){

	long long a,b,x,N;
	cin>>a>>b>>x>>N;
	
	long long c1 = 0,c2 = 0;
	
	if(x%2==0){
		//c1 += N/4;
		c2 += N/2;
		//if(N>=3)c2+=1;
	}
	else{
		c1 += N/2;
		N %= 4;
		//if(N>=3)c1 += 1;
	}
	
	cout<<c1<<' '<<c2<<endl;
	
    return 0;
}