#!/usr/bin/env python3
import collections as cl
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    S = LI()

    if len(set(S)) == N:
        print("YES")
    else:
        print("NO")


main() import collections as cl collections import sys sys def II():
    return int(sys.stdin.readline()) II return int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline def MI():
    return map(int, sys.stdin.readline().split()) MI return map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def LI():
    return list(map(int, sys.stdin.readline().split())) LI return list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def main():
    N = II()
    S = LI()

    if len(set(S)) == N:
        print("YES")
    else:
        print("NO") main N = II() N II() II S = LI() S LI() LI if len(set(S)) == N:
        print("YES")
    else:
        print("NO") len(set(S)) == N len(set(S)) len set(S) set S N print("YES") print "YES" print("NO") print "NO" main() main def II():
    return int(sys.stdin.readline()) def II():
    return int(sys.stdin.readline()) II def MI():
    return map(int, sys.stdin.readline().split()) def MI():
    return map(int, sys.stdin.readline().split()) MI def main():
    N = II()
    S = LI()

    if len(set(S)) == N:
        print("YES")
    else:
        print("NO") def main():
    N = II()
    S = LI()

    if len(set(S)) == N:
        print("YES")
    else:
        print("NO") main def LI():
    return list(map(int, sys.stdin.readline().split())) def LI():
    return list(map(int, sys.stdin.readline().split())) LI
#!/usr/bin/env python3
import collections as cl
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    S = LI()

    if len(set(S)) == N:
        print("YES")
    else:
        print("NO")


main()
