def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    a_list.sort()
    flag = True

    for i in range(n - 1):
        if a_list[i] == a_list[i + 1]:
            flag = False
            break

    if flag:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main() def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    a_list.sort()
    flag = True

    for i in range(n - 1):
        if a_list[i] == a_list[i + 1]:
            flag = False
            break

    if flag:
        print("YES")
    else:
        print("NO") main n = int(input()) n int(input()) int input() input a_list = list(map(int, input().split())) a_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split a_list.sort() a_list.sort a_list sort flag = True flag True for i in range(n - 1):
        if a_list[i] == a_list[i + 1]:
            flag = False
            break

     i range(n - 1) range n - 1 n 1 if a_list[i] == a_list[i + 1]:
            flag = False
            break

     a_list[i] == a_list[i + 1] a_list[i] a_list i a_list[i + 1] a_list i + 1 i 1 flag = False flag False break if flag:
        print("YES")
    else:
        print("NO") flag print("YES") print "YES" print("NO") print "NO" if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    a_list.sort()
    flag = True

    for i in range(n - 1):
        if a_list[i] == a_list[i + 1]:
            flag = False
            break

    if flag:
        print("YES")
    else:
        print("NO") def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    a_list.sort()
    flag = True

    for i in range(n - 1):
        if a_list[i] == a_list[i + 1]:
            flag = False
            break

    if flag:
        print("YES")
    else:
        print("NO") main
def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    a_list.sort()
    flag = True

    for i in range(n - 1):
        if a_list[i] == a_list[i + 1]:
            flag = False
            break

    if flag:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()
