#include <iostream>
#include<cmath>
using namespace std;

int main() {
    int n;
    while (cin >> n) { // 注意 while 处理多个 case
        if(n%2!=0){ //n为奇数
            cout<<0<<" "<<0<<endl;
        }else{  //n为偶数
            if(n%4==0){  //可被4整除
                cout<<n/4<<" "<<n/2<<endl;
            }else{  //不可被4整除
                cout<<(n/4)+1<<" "<<n/2<<endl;
            }
            
        }
    }
}
// 64 位输出请用 printf("%lld")