#include #include using namespace std; int main(void) {//値は二種類しか出てこないS-2かS-4 int i, n, asi[60],anst=0,ansk=0; cin >> n; for (i = 0; i < n; i++) { cin >> asi[i]; } sort(asi, asi + n); if (asi[0] == asi[n - 1]) { if ( ((asi[0] + 2 )/ n ) == 2)anst = n; else ansk = n; } else { for (i = 0; i < n; i++) { if (asi[0] == asi[i]) { anst += 1; ansk = n - anst; } } } cout << anst << " " << ansk << endl; return 0; }