Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=int(input())
- b=sorted(list(set([int(i) for i in input().split(" ")[:a]])))
- for i in range(1,a):
- if abs(b[i]-b[i-1])==1:
- print("YES")
- break
- else:
- print("NO")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement