View Code of Problem 87

#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,max,min;
	cin>>n;
	if(n%2!=0)cout<<0<<" "<<0;
	else{
		max = n / 2;
		min = n / 4 + n % 4 / 2;
		cout<<min<<" "<<max;
	}
	
	return 0;
}

Double click to view unformatted code.


Back to problem 87