mod = int(1e9+7)
def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c

def main():
    n = int(raw_input())
    
    arr = [int(x) for x in raw_input().split()]
    
    s = set(arr)
    
    if len(s) == len(arr):
        print('YES')
    else:
        print('NO')
    

main() mod = int(1e9+7) mod int(1e9+7) int 1e9+7 1e9 7 def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c add c = a + b c a + b a b if c >= mod:
        c -= mod
     c >= mod c mod c -= mod c mod return c c a a b b def main():
    n = int(raw_input())
    
    arr = [int(x) for x in raw_input().split()]
    
    s = set(arr)
    
    if len(s) == len(arr):
        print('YES')
    else:
        print('NO')
     main n = int(raw_input()) n int(raw_input()) int raw_input() raw_input int(x) for x in raw_input().split() for x in raw_input().split() x raw_input().split() ().split () raw_input split for x in raw_input().split() int(x) int x arr = [int(x) for x in raw_input().split()] arr [int(x) for x in raw_input().split()] s = set(arr) s set(arr) set arr if len(s) == len(arr):
        print('YES')
    else:
        print('NO')
     len(s) == len(arr) len(s) len s len(arr) len arr print('YES') print 'YES' print('NO') print 'NO' main() main def main():
    n = int(raw_input())
    
    arr = [int(x) for x in raw_input().split()]
    
    s = set(arr)
    
    if len(s) == len(arr):
        print('YES')
    else:
        print('NO')
     def main():
    n = int(raw_input())
    
    arr = [int(x) for x in raw_input().split()]
    
    s = set(arr)
    
    if len(s) == len(arr):
        print('YES')
    else:
        print('NO')
     main def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c add mod = int(1e9+7) int(1e9+7) mod
mod = int(1e9+7)
def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c

def main():
    n = int(raw_input())
    
    arr = [int(x) for x in raw_input().split()]
    
    s = set(arr)
    
    if len(s) == len(arr):
        print('YES')
    else:
        print('NO')
    

main()