def readinput():
    n=int(input())
    a=list(map(int,input().split()))
    return n,a

def main(n,a):
    a.sort()
    for i in range(n-1):
        if a[i]==a[i+1]:
            return 'NO'
    return 'YES'

if __name__=='__main__':
    n,a=readinput()
    ans=main(n,a)
    print(ans) def readinput():
    n=int(input())
    a=list(map(int,input().split()))
    return n,a readinput 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 return n,a return n,a n a def main(n,a):
    a.sort()
    for i in range(n-1):
        if a[i]==a[i+1]:
            return 'NO'
    return 'YES' main a.sort() a.sort a sort for i in range(n-1):
        if a[i]==a[i+1]:
            return 'NO'
     i range(n-1) range n-1 n 1 if a[i]==a[i+1]:
            return 'NO'
     a[i]==a[i+1] a[i] a i a[i+1] a i+1 i 1 return 'NO' 'NO' return 'YES' 'YES' n n a a if __name__=='__main__':
    n,a=readinput()
    ans=main(n,a)
    print(ans) __name__=='__main__' __name__ '__main__' n,a=readinput() n readinput() readinput a ans=main(n,a) ans main(n,a) main n a print(ans) print ans def main(n,a):
    a.sort()
    for i in range(n-1):
        if a[i]==a[i+1]:
            return 'NO'
    return 'YES' def main(n,a):
    a.sort()
    for i in range(n-1):
        if a[i]==a[i+1]:
            return 'NO'
    return 'YES' main def readinput():
    n=int(input())
    a=list(map(int,input().split()))
    return n,a def readinput():
    n=int(input())
    a=list(map(int,input().split()))
    return n,a readinput n,a=readinput() readinput() n a=readinput() readinput() a ans=main(n,a) main(n,a) ans
def readinput():
    n=int(input())
    a=list(map(int,input().split()))
    return n,a

def main(n,a):
    a.sort()
    for i in range(n-1):
        if a[i]==a[i+1]:
            return 'NO'
    return 'YES'

if __name__=='__main__':
    n,a=readinput()
    ans=main(n,a)
    print(ans)
