g = input().split()
a = input().split()
for k in range(len(a)):
  if(1<=int(a[k])<=10**9):
    a[k] = int(a[k])
  else:
    print('This numbers not allowed')
if(1<= int(g[0]) <= int(g[1])<= 3*10**5):
  v = []
  c = 0
  for i in range(len(a)):
    b = a.count(a[i])
    if(int(g[0]) <= b and int(a[i]) not in v):
      v.append(int(a[i]))
  for f in range(len(v)):
    v[f] = str(v[f])
  print(len(v))
  print(v)
else:
  print(":(")