#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n, nech=0, chet=0, maxnech=0, maxchet=0;
    cin>>n;
    for(long long i=1; i<=n; i++)
    {
        long long a;
        cin>>a;
        if(a%2==1)
        {
            nech+=1;
            if(maxnech<a)
            {
                maxnech=a;
            }
            else{}
        }
        else
        {
            chet+=1;
            if(maxchet<a)
            {
                maxchet=a;
            }
            else{}
        }
    }
    if((maxnech+1)/2 > nech)
    {
        cout<<((maxnech+1)/2)-nech<<" ";
    }
    else
    {
        cout<<0<<" ";
    }

    if(maxchet/2 > chet)
    {
        cout<<(maxchet/2)-chet<<endl;
    }
    else
    {
        cout<<0<<endl;
    }
    return 0;
}