#include <iostream>

using namespace std;


int main(){
    int a,low,high;
    while (cin>>a){
        if (a%2==1){
            low = high = 0;
        } else{
            low = a%4==0?a/4:a/4+1;
            high = a/2;
        }
        cout<<low<<" "<<high<<endl;
    }

    return 0;
}