#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    int maxch=0,maxnech=0;
    int brch=0,brnech=0;
    for(int i=0;i<n;i++)
    {
        if(a[i]%2==0)
        {
            brch++;
            if(a[i]>maxch)
            {
                maxch=a[i];
            }
        }
        if(a[i]%2==1)
        {
            brnech++;
            if(a[i]>maxnech)
            {
                maxnech=a[i];
            }
        }
    }
    int obshtnech=0,obshtch=0;
    for(int i=1;i<=maxnech;i+=2)
    {
        obshtnech++;
    }
    for(int i=26;i<=maxch;i+=2)
    {
        obshtch++;
    }
    cout <<obshtnech-brnech<<' '<<obshtch-brch;
    return 0;
}
