#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
const int MOD = 998244353;
const ll INF = 4611686018427387903LL;
int main()
{
  int N,M;
  cin >> N >> M;
  assert(1<=N&&N<=M&&M<=200000);
  set<int>A;
  rep(i,N){
    int a;cin >> a;
    assert(1<=a&&a<=M);
    A.insert(a);
  }
  if(N==M&&A.size()==1){
    cout << "1 1" << endl;
  }
  else{
    cout << A.size() << " " << 0 << endl;
  }

  return 0;
}