import sys

stdin = sys.stdin

from collections import deque



ns = lambda: stdin.readline().rstrip()

ni = lambda: int(ns())

na = lambda: list(map(int, stdin.readline().split()))



n = ni()

a = na()

b = set(a)

if len(a)==len(b):

    print("YES")

else:

    print("NO")
import sys

stdin = sys.stdin

from itertools import accumulate



ns = lambda: stdin.readline().rstrip()

ni = lambda: int(ns())

na = lambda: list(map(int, stdin.readline().split()))



n = ni()

a = na()

if n == len(set(a)):

    print("YES")

else:

    print("NO")
import sys

stdin = sys.stdin
from collections import deque

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
n = ni()
a = na()
b = set(a)
if len(a) == len(b):
    print("YES")
else:
    print("NO")

import sys

stdin = sys.stdin
from itertools import accumulate

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
n = ni()
a = na()
if n == len(set(a)):
    print("YES")
else:
    print("NO")

-from collections import deque +from itertools import accumulate -b = set(a) -if len(a) == len(b): +if n == len(set(a)):