#include<iostream>
using namespace std;

int main(){
int n,chislo,i=1,nech=0,ch=0,maxnech=0,maxch=0,brch,brnech;
cin>>n;
while(i<=n){
    cin>>chislo;
    if(chislo%2==0){
        ch++;
        if(chislo>maxch){
            maxch = chislo;
        }

    }
    else{
        nech++;
        if(chislo>maxnech){
            maxnech = chislo;
        }

    }

    i++;
}
brnech = (maxnech+1)/2;
brch = maxch/2;
cout<<brnech-nech<<" "<<brch-ch;

return 0;
}