#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,maxi=0,maxy=0,chetni=0,nechetni=0;
cin>>b;
for(int i=0;b>i;i++)
{
cin>>a;
if(a%2==0)
{
chetni++;
if(a>maxi)
{
maxi=a;
}
}
else
{
nechetni++;
if(a>maxy)
{
maxy=a;
}
}
}
int obsho_chetni=(maxi-1)/2;
int obsho_nechetni=(maxy-1)/2;
cout<<obsho_nechetni-nechetni+1<<" "<<obsho_chetni-chetni+1<<endl;
return 0;
}