#include #include using namespace std; using namespace atcoder; void solve() { int N, M; cin >> N >> M; vector A(N); for (int i = 0; i < N; ++i) { cin >> A[i]; } map mp; for (int i = 0; i < N; ++i) { ++mp[A[i]]; } int mx, mn; mx = mp.size(); mn = (M == 1 ? 1 : 0); cout << mx << " " << mn << endl; } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(15); solve(); return 0; }