#include <stdio.h>

int max_num(int n) {
    if (n % 2 != 0) return 0;
    else return n / 2;
}

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

int main() {
    int n;
    while (scanf("%d", &n) != EOF) {
        printf("%d %d\n", min_num(n), max_num(n));
    }
    return 0;
}