import math



def main():

    n = int(eval(input()))

    a = list(map(int, input().split()))

    cnt = {}

    for val in a:

        cnt[val] = cnt.get(val, 0) + 1

    distinct = True

    for val in cnt:

        if cnt[val] > 1:

            distinct = False

    if distinct:

        print("YES")

    else:

        print("NO")



if __name__ == '__main__':

    main()
n=int(eval(input()))

a=list(input().split())



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

    print('YES')

else:

    print('NO')

import math


def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    cnt = {}
    for val in a:
        cnt[val] = cnt.get(val, 0) + 1
    distinct = True
    for val in cnt:
        if cnt[val] > 1:
            distinct = False
    if distinct:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

n = int(eval(input()))
a = list(input().split())
if len(list(a)) == len(set(a)):
    print("YES")
else:
    print("NO")

-import math - - -def main(): -    n = int(eval(input())) -    a = list(map(int, input().split())) -    cnt = {} -    for val in a: -        cnt[val] = cnt.get(val, 0) + 1 -    distinct = True -    for val in cnt: -        if cnt[val] > 1: -            distinct = False -    if distinct: -        print("YES") -    else: -        print("NO") - - -if __name__ == "__main__": -    main() +n = int(eval(input())) +a = list(input().split()) +if len(list(a)) == len(set(a)): +    print("YES") +else: +    print("NO")