using System;
public class Program
{
public static void Main()
int[] a = new int[] {1,3, 2, 1, 2, 5,3,8,3,7,9,3,1,3,4,6};
Array.Sort(a);
int length = a.Length,cnt=1,cnt2=0,x=0;
int y=0;
for (int i = 0; i < length; i++)
for (int j = (i + 1); j < length; j++)
if (a[i] == a[j])
x = a[i];
while (x == a[j])
cnt++;
i++;
j++;
}
if(cnt > cnt2)
cnt2 = cnt;
y=x;
cnt=0;
Console.WriteLine("{0} repeated most number of times - {1}",y,cnt2);