设置变量n nums = sorted(list(set(list(map(int, input().split())))))
print(len(nums)) print(" ".join(str(i) for i in nums))