#include "bits/stdc++.h" #define int long long using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = 998244353; signed main() { ios::sync_with_stdio(false); cin.tie(0); int N, M; cin >> N >> M; vectorA(N); for (int i = 0; i < N; i++)cin >> A[i]; if (N == 1) { if (M == 1)cout << 1 << " " << 1 << endl; else cout << 1 << " " << 0 << endl; return 0; } bool ok = true; int a = A[0]; for (int i = 0; i < N; i++) { if (a != A[i])ok = false; } if (ok) { if(N == M)cout << 1 << " " << 1 << endl; else cout << 1 << " " << 0 << endl; return 0; } setst; for (int i = 0; i < N; i++)st.insert(A[i]); cout << (int)st.size() << " " << 0 << endl; return 0; }