def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return
main() def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return main N = int(input()) N int(input()) int input() input List = list(map(int,input().split())) List list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split Set = set() Set set() set for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
     i List if i in Set:
        	print('NO')
        	return
         i in Set i Set print('NO') print 'NO' return Set.add(i) Set.add Set add i print('YES') print 'YES' return main() main def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return main
def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return
main()