#include <bits/stdc++.h>
#define ull unsigned long long
#define ll long long
#define el endl
#define nl '\n'
#define all(v) v.begin(), v.end()
using namespace std;

void input()
{
    if (fopen("in.txt", "r"))
    {
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    }
}

void init()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
}
int main()
{
Fast:
    input();
    init();
    //---------------------------------------------------------------------------------------------------------------
    int n;
    cin >> n;
    int ar[n];
    int ev = 0, od = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> ar[i];

        if (ar[i] % 2 == 0)
            ev++;
        else
            od++;
    }
    cout << ev << nl << od;

    return 0;
}