#include<iostream>
#include<vector>
using namespace std;
int main(){
int n;
cin>>n;
int p;
vector<int> cnt(53,0);
for(int i=1;i<=n;i++){
cin>>p;cnt[p]++;
}
int maxct=0;
int minct=1000;
for(int i=1;i<=52;++i){
if(cnt[i]>maxct) maxct=cnt[i];
if(cnt[i]<minct) minct=cnt[i];
}
cout<<minct<<" "<<(maxct*52)-n<<endl;
}