// Skyqwq #include #define pb push_back #define fi first #define se second #define mp make_pair using namespace std; typedef long long LL; template void chkMax(T &x, T y) { if (y > x) x = y; } template void chkMin(T &x, T y) { if (y < x) x = y; } template void inline read(T &x) { int f = 1; x = 0; char s = getchar(); while (s < '0' || s > '9') { if (s == '-') f = -1; s = getchar(); } while (s <= '9' && s >= '0') x = x * 10 + (s ^ 48), s = getchar(); x *= f; } const int N = 2e5 + 5; int n, m, a[N], c[N]; int main() { read(n), read(m); int cnt = 0; for (int i = 1; i <= n; i++) { read(a[i]); if (!c[a[i]]) cnt++; c[a[i]]++; } int v = 0; if (n == m && c[1] == n) v = 1; printf("%d %d\n", cnt, v); return 0; }