L=[int(x) for x in input().split()] h={} for i in L: if i in h: h[i]+=1 else: h[i]=1 maxj=0 maxi=0 for j in h.values(): if j>maxj: maxj=j print(maxj,end=' ') print(*(sorted(list(h))[::-1]))
L = [int(x) for x in input().split()] h = {} for i in L: h[i] = h.get(i, 0) + 1 print(max(h.values()), end=' ') print(*(sorted(h.keys(), reverse=True)))