#include using namespace std; int main(){ int N, M; cin >> N >> M; vectorcnt(M+1,0); for(int i = 0; i < N; i++){ int a; cin >> a; cnt[a]++; } int type = 0; for(int i = 1; i <= M; i++){ if(cnt[i] == N && N == M){ cout << 1 << " " << 1 << endl; return 0; } if(cnt[i] > 0) type++; } cout << type << " " << 0 << endl; return 0; }