#include using namespace std; int main() { int i; int N; int X; int a; int b; int iCntA; int iCntB; cin >> N; a = - 1; b = - 1; iCntA = 0; iCntB = 0; for( i = 0; i < N; i++ ) { cin >> X; if( X == a ) iCntA++; else if( X == b ) iCntB++; else if( a == - 1 ) { a = X; iCntA++; } else if( b == - 1 ) { b = X; iCntB++; } } if( a > b ) cout << iCntA << " " << iCntB << endl; else cout << iCntB << " " << iCntA << endl; return 0; }