很自然的贪心算法
#include <iostream>
using namespace std;
int main()
{
int n,mini,maxi;
while(scanf("%d",&n)!=EOF){
if(n%2)mini=maxi=0;
else {
maxi=n/2;
if(n%4==0)mini=n/4;
else mini=n/4+1;
}
cout<<mini<<" "<<maxi<<endl;
}
return 0;
}