def main():

    N = int(eval(input()))

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

    s = set(A)

    if N == len(s):

        print("YES")

    else:

        print("NO")





if __name__ == '__main__':

    main()

def main():

    N = int(input())

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

    A.sort()

    for i in range(N-1):

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

            return print("NO")

    print("YES")





if __name__ == '__main__':

    main()

def main():
    N = int(eval(input()))
    A = [int(i) for i in input().split()]
    s = set(A)
    if N == len(s):
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    A.sort()
    for i in range(N - 1):
        if A[i] == A[i + 1]:
            return print("NO")
    print("YES")


if __name__ == "__main__":
    main()

-    N = int(eval(input())) +    N = int(input()) -    s = set(A) -    if N == len(s): -        print("YES") -    else: -        print("NO") +    A.sort() +    for i in range(N - 1): +        if A[i] == A[i + 1]: +            return print("NO") +    print("YES")