#include<iostream>
#include<conio.h>
using namespace std;
class TekrarClass
{
	private :
		double Numbers[15], a, MaxRepeatedNumber;
		int Counts[15], i, j, EmptyCellIndex, MaxRepeatCount;
	public :
		TekrarClass()
		{
			MaxRepeatCount = 0;
			EmptyCellIndex = 0;
			for(i=0; i < 15; i++)
			{
				Numbers[i] = 0;
				Counts[i] = 0;
			}
		}
		void SetIntArray() 
		{
			for(i=0; i < 15; i++)
			{
				//daryaft vorodi
				cin >> a;
				//ezafe kardan tedad dar araye Counts agar vorodi tekrar dasht
				for(j=0; j < EmptyCellIndex; j++)
					if(Numbers[j] == a)
					{
						Counts[j]++;
						break;
					}
				//ezafe kardan tedad dar araye Counts baraye vorodi jadid va Zakhire dar araye Numbers
				if(j == EmptyCellIndex)
				{
					Numbers[EmptyCellIndex] = a;
					Counts[EmptyCellIndex]++; 
					EmptyCellIndex++;
				}
			}
		}
		void Process()
		{
			for(i=0; i < 15; i++)
				if(Counts[i] > MaxRepeatCount)
				{
					MaxRepeatCount = Counts[i];
					MaxRepeatedNumber = Numbers[i];
				}
		}
		double GetMaxRepeatedNumber()
		{
			return MaxRepeatedNumber;
		}
		int GetMaxRepeatCount()
		{
			return MaxRepeatCount;
		}	
};

int main()
{
	TekrarClass A;
	cout << "tedade 15 adad vared konid : ";
	A.SetIntArray();
	//peida kardan adad bishtarin tekrar
	A.Process();
	cout << "Natije = " << A.GetMaxRepeatedNumber() << ", Tedade Tekrar = " << A.GetMaxRepeatCount() << endl;
	getch();
}

