#include<iostream>
using namespace std;
int main()
{
    short n,nchbr=0,golch=0,golnch=0,chbr=0,krai[1],v=0;
    cin>>n;

    int i=0;
    short ch[n];
    for(;i<n;i++)
    {
        cin>>ch[i];
        if(ch[i]%2==0 and golch<ch[i])
        {
           golch= ch[i];

        }
        if(ch[i]%2==0)
        {
            chbr++;
        }

        if(ch[i]%2==1 and golnch<ch[i])
        {
           golnch= ch[i];
        }

        if(ch[i]%2==1)
        {
            nchbr++;
        }
    }
    golch=golch/2;
    golnch=golnch/2+1;
    krai[0]=golch-chbr;
    krai[1]=golnch-nchbr;
    cout<<krai[1]<<" "<<krai[0];








        return 0;
}

