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