def main():
    """"ここに今までのコード"""
    N = int(input())
    num_list = list(map(int, input().split()))
    num_list.sort()
    distinctFlg = False

    for i in range(N - 1):
        if num_list[i] == num_list[i+1]:
            distinctFlg = True
            break
    
    if distinctFlg:
        print("NO")
    else:
        print("YES")

if __name__ == '__main__':
    main() def main():
    """"ここに今までのコード"""
    N = int(input())
    num_list = list(map(int, input().split()))
    num_list.sort()
    distinctFlg = False

    for i in range(N - 1):
        if num_list[i] == num_list[i+1]:
            distinctFlg = True
            break
    
    if distinctFlg:
        print("NO")
    else:
        print("YES") main """"ここに今までのコード""" N = int(input()) N int(input()) int input() input num_list = list(map(int, input().split())) num_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split num_list.sort() num_list.sort num_list sort distinctFlg = False distinctFlg False for i in range(N - 1):
        if num_list[i] == num_list[i+1]:
            distinctFlg = True
            break
    
     i range(N - 1) range N - 1 N 1 if num_list[i] == num_list[i+1]:
            distinctFlg = True
            break
    
     num_list[i] == num_list[i+1] num_list[i] num_list i num_list[i+1] num_list i+1 i 1 distinctFlg = True distinctFlg True break if distinctFlg:
        print("NO")
    else:
        print("YES") distinctFlg print("NO") print "NO" print("YES") print "YES" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    """"ここに今までのコード"""
    N = int(input())
    num_list = list(map(int, input().split()))
    num_list.sort()
    distinctFlg = False

    for i in range(N - 1):
        if num_list[i] == num_list[i+1]:
            distinctFlg = True
            break
    
    if distinctFlg:
        print("NO")
    else:
        print("YES") def main():
    """"ここに今までのコード"""
    N = int(input())
    num_list = list(map(int, input().split()))
    num_list.sort()
    distinctFlg = False

    for i in range(N - 1):
        if num_list[i] == num_list[i+1]:
            distinctFlg = True
            break
    
    if distinctFlg:
        print("NO")
    else:
        print("YES") main
def main():
    """"ここに今までのコード"""
    N = int(input())
    num_list = list(map(int, input().split()))
    num_list.sort()
    distinctFlg = False

    for i in range(N - 1):
        if num_list[i] == num_list[i+1]:
            distinctFlg = True
            break
    
    if distinctFlg:
        print("NO")
    else:
        print("YES")

if __name__ == '__main__':
    main()