#include<bits/stdc++.h>
using namespace std;
int main(){
    long long brNezadraskani, chetno = 0, nechetno = 0;
    cin>>brNezadraskani;
    bool vlqzohLi = false;
    long long nezadraskani[brNezadraskani];
    for(int n = 0; n < brNezadraskani; n++){
        cin>>nezadraskani[n];
    }
    sort(nezadraskani, nezadraskani + brNezadraskani);
    for(int n = 1; n < nezadraskani[brNezadraskani - 2]; n++){
        for(int l = 0; l < brNezadraskani; l++){
            if(n == nezadraskani[l]){
                break;
            }
            else
            {
                if(n % 2 == 0){
                    chetno++;
                }
                else
                {
                    nechetno++;
                }
            }
        }
    }


    cout<<nechetno<<" "<<chetno / 7<<endl;



    return 0;
}

