#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); int N,M; cin >> N >> M; vector A(N); rep(i,N) cin >> A[i]; set st(A.begin(), A.end()); int ma = int(st.size()); if(int(st.size()) < M) { if(N == M) { cout << ma << " " << 1 << endl; } else { cout << ma << " " << 0 << endl; } } else if(int(st.size()) == 1) { cout << ma << " " << 1 << endl; } else { cout << ma << " " << 0 << endl; } }