def main():
    n = int(input())
    nums = input().split(' ')
    s = set()
    result = 'YES'

    for i in range(n):
        num = nums[i]
        if num in s:
            result = 'NO'
            break
        s.add(num)

    print(result)


if __name__ == '__main__':
    main() def main():
    n = int(input())
    nums = input().split(' ')
    s = set()
    result = 'YES'

    for i in range(n):
        num = nums[i]
        if num in s:
            result = 'NO'
            break
        s.add(num)

    print(result) main n = int(input()) n int(input()) int input() input nums = input().split(' ') nums input().split(' ') ().split () input split ' ' s = set() s set() set result = 'YES' result 'YES' for i in range(n):
        num = nums[i]
        if num in s:
            result = 'NO'
            break
        s.add(num)

     i range(n) range n num = nums[i] num nums[i] nums i if num in s:
            result = 'NO'
            break
         num in s num s result = 'NO' result 'NO' break s.add(num) s.add s add num print(result) print result if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    n = int(input())
    nums = input().split(' ')
    s = set()
    result = 'YES'

    for i in range(n):
        num = nums[i]
        if num in s:
            result = 'NO'
            break
        s.add(num)

    print(result) def main():
    n = int(input())
    nums = input().split(' ')
    s = set()
    result = 'YES'

    for i in range(n):
        num = nums[i]
        if num in s:
            result = 'NO'
            break
        s.add(num)

    print(result) main
def main():
    n = int(input())
    nums = input().split(' ')
    s = set()
    result = 'YES'

    for i in range(n):
        num = nums[i]
        if num in s:
            result = 'NO'
            break
        s.add(num)

    print(result)


if __name__ == '__main__':
    main()
