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