#include <iostream>

using namespace std;

int maxNum (int n){
	if (n % 2 == 1){
		return 0;
	}else{
		return n / 2;
	}
}

int minNum (int n){
	if (n % 2 == 1){
		return 0;
	}
	if (n % 4 == 0){
		return n / 4;
	} else{
		return n / 4 + 1;
	}
}

int main () {
	int n;
	while (cin >> n){
		cout << minNum(n) << " " << maxNum(n) << endl;
	}
	return 0;
}