#include using namespace std; int n, m, s, t = 0; int a[200000]; int main() { cin >> n >> m; for (int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); s = n; if (n == m && a[0] == a[n - 1]) t = 1; for (int i = 0; i < n - 1; i++) if (a[i] == a[i + 1]) s--; cout << s << " " << t << endl; }