def solve():
    N = int(input())
    A = [int(i) for i in input().split()]

    set_A = set([])
    for num in A:
        if num in set_A:
            print('NO')
            return
        set_A.add(num)
    print('YES')

if __name__ == "__main__":
    solve() def solve():
    N = int(input())
    A = [int(i) for i in input().split()]

    set_A = set([])
    for num in A:
        if num in set_A:
            print('NO')
            return
        set_A.add(num)
    print('YES') solve N = int(input()) N int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = [int(i) for i in input().split()] A [int(i) for i in input().split()] set_A = set([]) set_A set([]) set [] for num in A:
        if num in set_A:
            print('NO')
            return
        set_A.add(num)
     num A if num in set_A:
            print('NO')
            return
         num in set_A num set_A print('NO') print 'NO' return set_A.add(num) set_A.add set_A add num print('YES') print 'YES' if __name__ == "__main__":
    solve() __name__ == "__main__" __name__ "__main__" solve() solve def solve():
    N = int(input())
    A = [int(i) for i in input().split()]

    set_A = set([])
    for num in A:
        if num in set_A:
            print('NO')
            return
        set_A.add(num)
    print('YES') def solve():
    N = int(input())
    A = [int(i) for i in input().split()]

    set_A = set([])
    for num in A:
        if num in set_A:
            print('NO')
            return
        set_A.add(num)
    print('YES') solve
def solve():
    N = int(input())
    A = [int(i) for i in input().split()]

    set_A = set([])
    for num in A:
        if num in set_A:
            print('NO')
            return
        set_A.add(num)
    print('YES')

if __name__ == "__main__":
    solve()