#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair Pr; int N; int A[51]; int main() { int turu=0, kame=0,num =0; cin >> N; num = N * 2; for (int i = 0; i < N; i++) { int a; cin >> a; A[a]++; } bool flag = false; for (int i = 0; i <= 50; i++) { if (!flag && A[i] != 0) { kame = A[i]; flag = true; } else if(flag && A[i] != 0){ turu = A[i]; } } cout << turu << " " << kame << endl; return 0; }