def abc154c_distinct_or_not():
    n = int(input())
    a = set(map(int, input().split()))
    if n == len(a):
        print('YES')
    else:
        print('NO')

abc154c_distinct_or_not() def abc154c_distinct_or_not():
    n = int(input())
    a = set(map(int, input().split()))
    if n == len(a):
        print('YES')
    else:
        print('NO') abc154c_distinct_or_not n = int(input()) n int(input()) int input() input a = set(map(int, input().split())) a set(map(int, input().split())) set map(int, input().split()) map int input().split() ().split () input split if n == len(a):
        print('YES')
    else:
        print('NO') n == len(a) n len(a) len a print('YES') print 'YES' print('NO') print 'NO' abc154c_distinct_or_not() abc154c_distinct_or_not def abc154c_distinct_or_not():
    n = int(input())
    a = set(map(int, input().split()))
    if n == len(a):
        print('YES')
    else:
        print('NO') def abc154c_distinct_or_not():
    n = int(input())
    a = set(map(int, input().split()))
    if n == len(a):
        print('YES')
    else:
        print('NO') abc154c_distinct_or_not
def abc154c_distinct_or_not():
    n = int(input())
    a = set(map(int, input().split()))
    if n == len(a):
        print('YES')
    else:
        print('NO')

abc154c_distinct_or_not()