#include <iostream>
using namespace std;

int main() {
    int n ;
    while(cin>>n){
        if(n%2==1){
            cout<<"0 0"<<endl;
        }else{
            int max = n/2; 
            int min = n/4+(n%4)/2;
            cout<<min<<" "<<max<<endl;
        }
    }
}
// 64 位输出请用 printf("%lld")