n = int(eval(input()))

a = [int(i) for i in input().split()]



a.sort()



for i in range(n-1):

    if a[i] == a[i+1]:

        print('NO')

        break

else:

    print('YES')
import sys



readline = sys.stdin.readline

MOD = 10 ** 9 + 7

INF = float('INF')

sys.setrecursionlimit(10 ** 5)





def main():

    N = int(readline())

    A = list(map(int, readline().split()))

    S = set(A)



    if len(S) == N:

        print("YES")

    else:

        print("NO")





if __name__ == '__main__':

    main()

n = int(eval(input()))
a = [int(i) for i in input().split()]
a.sort()
for i in range(n - 1):
    if a[i] == a[i + 1]:
        print("NO")
        break
else:
    print("YES")

import sys

readline = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)


def main():
    N = int(readline())
    A = list(map(int, readline().split()))
    S = set(A)
    if len(S) == N:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

-n = int(eval(input())) -a = [int(i) for i in input().split()] -a.sort() -for i in range(n - 1): -    if a[i] == a[i + 1]: +import sys + +readline = sys.stdin.readline +MOD = 10**9 + 7 +INF = float("INF") +sys.setrecursionlimit(10**5) + + +def main(): +    N = int(readline()) +    A = list(map(int, readline().split())) +    S = set(A) +    if len(S) == N: +        print("YES") +    else: -        break -else: -    print("YES") + + +if __name__ == "__main__": +    main()