from collections import defaultdict
def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    d = defaultdict(lambda:0)
    for i in range(n):
        d[a[i]] += 1
    if max(d.values()) >1:
        print("NO")
    else:
        print("YES")
        
if __name__ == "__main__":
    main() from collections import defaultdict def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    d = defaultdict(lambda:0)
    for i in range(n):
        d[a[i]] += 1
    if max(d.values()) >1:
        print("NO")
    else:
        print("YES")
         main n = int(input()) n int(input()) int input() input a = list(map(int, input().split(" "))) a list(map(int, input().split(" "))) list map(int, input().split(" ")) map int input().split(" ") ().split () input split " " d = defaultdict(lambda:0) d defaultdict(lambda:0) defaultdict lambda:0 0 for i in range(n):
        d[a[i]] += 1
     i range(n) range n d[a[i]] += 1 d[a[i]] d a[i] a i 1 if max(d.values()) >1:
        print("NO")
    else:
        print("YES")
         max(d.values()) >1 max(d.values()) max d.values() d.values d values 1 print("NO") print "NO" print("YES") print "YES" if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    d = defaultdict(lambda:0)
    for i in range(n):
        d[a[i]] += 1
    if max(d.values()) >1:
        print("NO")
    else:
        print("YES")
         def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    d = defaultdict(lambda:0)
    for i in range(n):
        d[a[i]] += 1
    if max(d.values()) >1:
        print("NO")
    else:
        print("YES")
         main
from collections import defaultdict
def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    d = defaultdict(lambda:0)
    for i in range(n):
        d[a[i]] += 1
    if max(d.values()) >1:
        print("NO")
    else:
        print("YES")
        
if __name__ == "__main__":
    main()