#include<iostream>
using namespace std;
int main(){
long long n,n2,lol,zch,znch,nznch,nzch;
cin>>n;
znch=0;
zch=0;
for(lol=0; lol<n; lol=lol+1){
cin>>n2;
if(n2%2>0){
nznch=nznch+1;
}
if(n2%2==0){
nzch=nzch+1;
}

}
if(nzch>nznch and n%2>0){
    znch=n/2+1;
    zch=n/2;
}
else(n%2>0);{
zch=n/2+1;
znch=n/2;
}
if(nznch>nzch and n%2>0){
    zch=n/2+1;
    znch=n/2;
}
else(n%2>0);{
znch=n/2+1;
zch=n/2;
}
cout<<znch<<" "<<zch;
return 0;
}
