import sys
from collections import defaultdict

sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))

d = defaultdict(int)
for i in a:
    d[i] += 1

for i in a:
    if d[i] > 1:
        print("NO")
        exit()

print("YES") import sys sys from collections import defaultdict sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin 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 d = defaultdict(int) d defaultdict(int) defaultdict int for i in a:
    d[i] += 1 i a d[i] += 1 d[i] d i 1 for i in a:
    if d[i] > 1:
        print("NO")
        exit() i a if d[i] > 1:
        print("NO")
        exit() d[i] > 1 d[i] d i 1 print("NO") print "NO" exit() exit print("YES") print "YES" n = int(input()) int(input()) n d = defaultdict(int) defaultdict(int) d a = list(map(int, input().split())) list(map(int, input().split())) a input = sys.stdin.readline sys.stdin.readline input
import sys
from collections import defaultdict

sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))

d = defaultdict(int)
for i in a:
    d[i] += 1

for i in a:
    if d[i] > 1:
        print("NO")
        exit()

print("YES")
