#include<cstdio>
int main(){
	int n;
	while (scanf("%d", &n) != EOF){
		if (n % 2 == 1){
			printf("0 0\n");
		}
		else{
			int min,max;
			max = n / 2;
			if (n % 4 != 0){
				min = n / 4 + 1;
			}
			else{
				min = n / 4;
			}
			printf("%d %d\n", min, max);
		}
	}
}