import sys


def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    print("YES" if n == len(set(a)) else "NO")


if __name__ == "__main__":
    main() import sys sys def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    print("YES" if n == len(set(a)) else "NO") main input = sys.stdin.buffer.readline input sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline 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 print("YES" if n == len(set(a)) else "NO") print "YES" if n == len(set(a)) else "NO" n == len(set(a)) n len(set(a)) len set(a) set a "YES" "NO" if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    print("YES" if n == len(set(a)) else "NO") def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    print("YES" if n == len(set(a)) else "NO") main
import sys


def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    print("YES" if n == len(set(a)) else "NO")


if __name__ == "__main__":
    main()
