#include using namespace std; // #include // using namespace atcoder; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= n; ++i) #define reps(i, s, e) for (ll i = s; i <= e; ++i) #define all(v) v.begin(), v.end() using ll = long long; using ld = long double; using cp = complex; using pa = pair; using tup = tuple; using vp = vector>; using vtup = vector>; using st = string; using vs = vector; using vc = vector; using vvi = vector>; using vvc = vector>; using vi = vector; const ll MOD1 = 1000000007; const ll MOD2 = 998244353; const ll INF = (1LL << 60); int main() { ll n, m; cin >> n >> m; vi a(n); rep(i, n) cin >> a[i]; sort(all(a)); ll mn, mx; set st; rep(i, n) st.insert(a[i]); if (st.size() == 1 and n == m) { mn = 1; } else { mn = 0; } mx = st.size(); cout << mx << " " << mn << endl; }