#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main() { ll n, m, cnt = 0; cin >> n >> m; vector a(m); for (int i = 0; i < n; i++){ int t; cin >> t; if (a[t] == 0){ cnt++; a[t]++; } } if (cnt == 1 && n == m) cout << 1 << " " << 1 << endl; else cout << cnt << " " << 0 << endl; }