#include<iostream>
using namespace std;

int main() {
    int n;
    int arr[n];
    cin >> n;

    int br_chet = 0;
    int br_nechet = 0;
    int maxx_chet = 0;
    int maxx_nechet = 0;

    for (int i = 0; i < n; i++) {
        cin >> arr[i];
        if (arr[i] % 2 == 0) {
            if (arr[i] > maxx_chet) {
                maxx_chet = arr[i];
            }
            br_chet++;
        }
        else {
            if (arr[i] > maxx_nechet) {
                maxx_nechet = arr[i];
            }
            br_nechet++;
        }
    }
    int chet = (maxx_chet - 2) / 2 + 1;
    int nechet = (maxx_nechet - 1) / 2 + 1;
    cout << nechet - br_nechet << " " << chet - br_chet << endl;
    return 0;
}
