import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from  collections import defaultdict
from collections import Counter
import bisect
def main():
     N = I()
     A = LI()
     c = Counter(A)
     if len(c.values()) == N:
         print('YES')
     else:
         print('NO')
if __name__ == "__main__":
    main()
 import bisect, collections, copy, heapq, itertools, math, string bisect collections copy heapq itertools math string import sys sys def I(): return int(sys.stdin.readline().rstrip()) I def MI(): return map(int, sys.stdin.readline().rstrip().split()) MI def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS from  collections import defaultdict from collections import Counter import bisect bisect def main():
     N = I()
     A = LI()
     c = Counter(A)
     if len(c.values()) == N:
         print('YES')
     else:
         print('NO') main N = I() N I() I A = LI() A LI() LI c = Counter(A) c Counter(A) Counter A if len(c.values()) == N:
         print('YES')
     else:
         print('NO') len(c.values()) == N len(c.values()) len c.values() c.values c values N print('YES') print 'YES' print('NO') print 'NO' if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def MI(): return map(int, sys.stdin.readline().rstrip().split()) def MI(): return map(int, sys.stdin.readline().rstrip().split()) MI def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) def LI(): return list(map(int, sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S def main():
     N = I()
     A = LI()
     c = Counter(A)
     if len(c.values()) == N:
         print('YES')
     else:
         print('NO') def main():
     N = I()
     A = LI()
     c = Counter(A)
     if len(c.values()) == N:
         print('YES')
     else:
         print('NO') main def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from  collections import defaultdict
from collections import Counter
import bisect
def main():
     N = I()
     A = LI()
     c = Counter(A)
     if len(c.values()) == N:
         print('YES')
     else:
         print('NO')
if __name__ == "__main__":
    main()

