#include <iostream>
#include <algorithm>

using namespace std;

int main(){
	int num;
	int list[100] = {0};

	while (cin >> num){
		list[num]++;
	}

	sort(list, list + 100);

	cout << list[99] << endl;
	
	for (;;){
		int i = 98;
		if (list[i] == list[i + 1]){
			cout << list[i] << endl;
		}
		else {
			break;
		}
		i--;
	}

	return 0;
}