#include using namespace std; #define rep(i,n) for(int i=0; i<(n); i++) #define INF ((1LL<<62)-(1LL<<31)) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() typedef long long ll; typedef pair pl; //const ll mod=1000000007; int main() { int n,m; cin >> n >> m; vector a(n); set s; rep(i,n) { cin >> a[i]; s.insert(a[i]); } cout << s.size() << " "; if(s.size()==1&&n==m) cout << 1 << endl; else cout << 0 << endl; }