#include <iostream>
#include <cstdio>

using namespace std;

int main(){
    int n;
    int m,t;//m最少,t最多
    while(scanf("%d",&n)!=EOF){
        if(n%2==1){
            printf("0 0\n");
        }else{
            t=n/2;
            m=(n+2)/4;//优秀吧!!!!!!!!!!!!!!!!!!!
            printf("%d %d\n",m,t);
        }
    }
}