a,b,c=list(map(int,input().split()))
list1=[a,b,c]
if a==b and b==c:
print(3,end=" ")
print(a)
elif a==b or b==c or a==c:
print(2,end=" ")
list2=list(set(list1))
print(max(list2),min(list2))
else:
print(1,end=" ")
list1.sort()
list1.reverse()
print(list1[0],list1[1],list1[2])