Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split( )))
c =0
m = p[0]
for i in range(n):
    if m => p[i]:
        c += 1
        m = p[i]
print(c)

Fixed submission:
n = int(input())
p = list(map(int, input().split( )))
c = 1
m = p[0]
for a in p[1:]:
    m = min(m, a)
    if m == a:
        c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
ans = "No"
if n % 2 == 0:
    ans = "Yes"
    for i in range(n / 2):
        if s[i] != s[n / 2 + i]:
            ans = "No"
            break
print(ans)


Fixed submission:
n = int(input())
s = input()
ans = "No"
if n % 2 == 0:
    ans = "Yes"
    for i in range(n // 2):
        if s[i] != s[n // 2 + i]:
            ans = "No"
            break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
ans = "No"
if n % 2 == 0:
    if s[0:n / 2] == s[n / 2:]:
        ans = "Yes"
print(ans)

Fixed submission:
n = int(input())
s = input()
ans = "No"
if n % 2 == 0:
    ans = "Yes"
    for i in range(n // 2):
        if s[i] != s[n // 2 + i]:
            ans = "No"
            break
print(ans)
Buggy python submission (verdict: Runtime Error):
from math import pi, tan
EPS = 0.0000000001

def f(a, b, theta):
    if theta >= pi * 0.5:
        return 0.0
    elif tan(theta) >= b / a:
        return a * b**2 * 0.5 / tan(theta)
    else:
        return a**2 * b - a**2 *b * 0.5 * tan(theta)

a, b, x = map(int, input().split())

l = 0
r = pi * 0.5
while r - l >= EPS:
    mid = (l + r) * 0.5
    if f(a, b, theta) >= x:
        l = mid
    else:
        r = mid

print("{:.10f}".format(l / pi * 180))


Fixed submission:
from math import pi, sin, cos, tan
EPS = 0.0000000001

def f(a, b, theta):
    if theta > pi * 0.5 - EPS:
        ret = 0.0
    elif a * tan(theta) <= b:
        ret = a**2 * b - a**3 * tan(theta) * 0.5
    else:
        ret = a * b**2 * 0.5 / tan(theta)

    return ret

a, b, x = map(int, input().split())

ok = pi * 0.5
ng = 0.0
while ok - ng >= EPS:
    mid = (ok + ng) * 0.5
    if f(a, b, mid) < x:
        ok = mid
    else:
        ng = mid
print("{:.10f}".format(ok / pi * 180))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
slist = []
scount = [1]
sinputlist = sorted(list(input()))
s = sinputlist[0]
for a in sinputlist[1:]:
    s += a
slist.append(s)
c = 0
for i in range(n-1):
    lastc = c
    sinputlist = sorted(list(input()))
    s = sinputlist[0]
    for a in sinputlist[1:]:
        s += a
    for j in range(len(slist)):
        if s == slist[j]:
            c += scount[j]
            scount[j] += 1
    if c == lastc:
        slist.append(s)
        scount.append(1)
print(c)


Fixed submission:
import math
n = int(input())
l = ["".join(sorted(input())) for i in range(n)]
l.sort()
c = 0
b = l[0]
ans = 0
for s in l[1:]:
    if s == b:
        c += 1
    else:
        ans += c * (c + 1) * 0.5
        c = 0
    b = s
ans += c * (c + 1) * 0.5
print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
slist = []
scount = [1]
sinputlist = sorted(list(input()))
s = sinputlist[0]
for a in sinputlist[1:]:
    s += a
slist.append(s)
c = 0
for i in range(n-1):
    lastc = c
    sinputlist = sorted(list(input()))
    s = sinputlist[0]
    for a in sinputlist[1:]:
        s += a
    for j in range(len(slist)):
        if s == slist[j]:
            c += scount[j]
            scount[j] += 1
    if c == lastc:
        slist.append(s)
        scount.append(1)
print(c)


Fixed submission:
import math
n = int(input())
l = ["".join(sorted(input())) for i in range(n)]
l.sort()
c = 0
b = l[0]
ans = 0
for s in l[1:]:
    if s == b:
        c += 1
    else:
        ans += c * (c + 1) * 0.5
        c = 0
    b = s
ans += c * (c + 1) * 0.5
print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
slist = []
sinputlist = sorted(list(input()))
s = sinputlist[0]
for a in sinputlist[1:]:
    s += a
slist.append(s)
c = 0
for i in range(n-1):
    lastc = c
    sinputlist = sorted(list(input()))
    s = sinputlist[0]
    for a in sinputlist[1:]:
        s += a
    for b in slist:
        if s == b:
            c += 1
    #if c == lastc:
    slist.append(s)
print(c)


Fixed submission:
import math
n = int(input())
l = ["".join(sorted(input())) for i in range(n)]
l.sort()
c = 0
b = l[0]
ans = 0
for s in l[1:]:
    if s == b:
        c += 1
    else:
        ans += c * (c + 1) * 0.5
        c = 0
    b = s
ans += c * (c + 1) * 0.5
print(int(ans))
Buggy python submission (verdict: Runtime Error):
import math
a, b, c, d = map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
ans = b - a + 1
ans -= b // c - (a - 1) // c
ans -= b // d - (a - 1) // d
ans += b // (c * d) - (a - 1) // lcm(c, d)
print(ans)


Fixed submission:
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

a, b, c, d = map(int, input().split())
ans = b - a + 1
ans -= b // c - (a - 1) // c
ans -= b // d - (a - 1) // d
ans += b // lcm(c, d) - (a - 1) // lcm(c, d)
print(ans)
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>

int main(){
  int R, G, B, N, ans = 0;
  scanf("%d %d %d %d", &R, &G, &B, &N);
  for(int i = 0; i <= 3000; i++){
    for(int j = 0; j <= 3000; j++){
      int v = R * i + G * j;
      if(N >= v && (N - v) % B == 0) ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}


Fixed submission:
R, G, B, N = map(int, input().split())
ans = 0

for r in range(min(3000, 3000 // R) + 1):
    if R * r <= N:
        for g in range(min(3000, 3000 // G) + 1):
            v = R * r + G * g
            if N >= v and (N - v) % B == 0:
                ans += 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
R, G, B, N = map(int, input().split())
ans = 0

for r in range(3000 + 1):
    if R * r <= N:
        for g in range(3000 + 1):
            v = R * r + G * g
            if N >= v and (N - v) % B == 0:
                ans += 1

print(ans)


Fixed submission:
R, G, B, N = map(int, input().split())
ans = 0

for r in range(min(3000, 3000 // R) + 1):
    if R * r <= N:
        for g in range(min(3000, 3000 // G) + 1):
            v = R * r + G * g
            if N >= v and (N - v) % B == 0:
                ans += 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
R, G, B, N = map(int, input().split())
ans = 0

for r in range(min(3000, 3000 // R) + 1):
    for g in range(min(3000, 3000 // G) + 1):
        v = R * r + G * g
        if N >= v and (N - v) % B == 0:
            ans += 1

print(ans)


Fixed submission:
R, G, B, N = map(int, input().split())
ans = 0

for r in range(min(3000, 3000 // R) + 1):
    if R * r <= N:
        for g in range(min(3000, 3000 // G) + 1):
            v = R * r + G * g
            if N >= v and (N - v) % B == 0:
                ans += 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
R, G, B, N = map(int, input().split())
ans = 0

for r in range(3001):
    for g in range(3001):
        v = R * r + G * g
        if N >= v and (N - v) % B == 0:
            ans += 1

print(ans)


Fixed submission:
R, G, B, N = map(int, input().split())
ans = 0

for r in range(min(3000, 3000 // R) + 1):
    if R * r <= N:
        for g in range(min(3000, 3000 // G) + 1):
            v = R * r + G * g
            if N >= v and (N - v) % B == 0:
                ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
s = input()
L = [0 for _ in range(n)]

for i in range(n - 1):
    if s[i:i + 2] == "AC":
        L[i + 1] = 1
        i += 1

for i in range(q):
    l, r = map(int, input().split())
    print(sum(L[l:r]))


Fixed submission:
n, q = map(int, input().split())
s = input()
t = [0] * n
for i in range(1, n):
    t[i] = t[i - 1] + (1 if s[i - 1:i + 1] == "AC" else 0)
for i in range(q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])

Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
s = input()

def counter(L, R):
    c = 0
    for i in range(L, R):
        if s[i:i + 2] == "AC":
            c += 1
            i +=1
    return c

for i in range(q):
    l, r = map(int, input().split())
    print(counter(l - 1, r - 1))


Fixed submission:
n, q = map(int, input().split())
s = input()
t = [0] * n
for i in range(1, n):
    t[i] = t[i - 1] + (1 if s[i - 1:i + 1] == "AC" else 0)
for i in range(q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])

Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
s = input()

def counter(L, R):
    c = 0
    for i in range(L, R):
        if s[i:i + 2] == "AC":
            c += 1
    return c

for i in range(q):
    l, r = map(int, input().split())
    print(counter(l - 1, r - 1))


Fixed submission:
n, q = map(int, input().split())
s = input()
t = [0] * n
for i in range(1, n):
    t[i] = t[i - 1] + (1 if s[i - 1:i + 1] == "AC" else 0)
for i in range(q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())]
if a & 1 and b & 1:
    print("Yes")
else:
    print("No")


Fixed submission:
a, b = map(int, input().split())
if a & 1 and b & 1:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(input())
cmin = n + 1
for i in range(n):
    c = s[:i].count("W") + s[i:].count("E")
    if cmin > c:
        cmin = c
print(cmin)


Fixed submission:
n = int(input())
s = list(input())
c = s[1:].count("E")
ans = c
for i in range(1, n):
    c -= (1 if s[i] == "E" else 0)
    c += (1 if s[i - 1] == "W" else 0)
    ans = min(c, ans)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = list(map(int, input().split()))
l = x[1:]
print(sorted(l)[n // 2 - 1])
for i in range(1, n):
    l[i - 1] = x[i - 1]
    print(sorted(l)[n // 2 - 1])


Fixed submission:
n = int(input())
x = list(map(int, input().split()))
l = sorted(x)[n // 2 - 1]
r = sorted(x)[n // 2]
for i in x:
    if i <= l:
        print(r)
    else:
        print(l)
Buggy python submission (verdict: Runtime Error):
ab = input().rstrip().split(" ")
a = ab[0]
b = ab[1]
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")

Fixed submission:
ab = input().rstrip().split(" ")
a = int(ab[0])
b = int(ab[1])
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
3 5
#####
#####
#####h, w = map(int, input().split())
field = [["" for _ in range(w)] for _ in range(h)]
for i in range(h):
    s = input()
    for j in range(w):
        field[i][j] = s[j]

dx = [1, 1, 0, -1, -1, -1, 0, 1]
dy = [0, 1, 1, 1, 0, -1, -1, -1]

def numbering(x, y):
    if field[y][x] == ".":
        c = 0
        for i in range(8):
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx and nx < w and 0 <= ny and ny < h:
                if field[ny][nx] == "#":
                    c += 1
        field[y][x] = str(c)

for X in range(w):
    for Y in range(h):
        numbering(X, Y)

for Y in range(h):
    for X in range(w):
        print(field[Y][X], end = "")
    print()


Fixed submission:
h, w = map(int, input().split())
field = [["" for _ in range(w)] for _ in range(h)]
for i in range(h):
    s = input()
    for j in range(w):
        field[i][j] = s[j]

dx = [1, 1, 0, -1, -1, -1, 0, 1]
dy = [0, 1, 1, 1, 0, -1, -1, -1]

def numbering(x, y):
    if field[y][x] == ".":
        c = 0
        for i in range(8):
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx and nx < w and 0 <= ny and ny < h:
                if field[ny][nx] == "#":
                    c += 1
        field[y][x] = str(c)

for X in range(w):
    for Y in range(h):
        numbering(X, Y)

for Y in range(h):
    for X in range(w):
        print(field[Y][X], end = "")
    print()
Buggy python submission (verdict: Runtime Error):
s = input()
l = sorted(list({s[i] for i in range(len(s))}))
if len(l) == 26:
    ans = "None"
else:
    for i in range(len(l) - 1):
        if ord(l[i]) + 1 != ord(l[i + 1]):
            ans = chr(ord(l[i]) + 1)
            break
print(ans)


Fixed submission:
s = input()
l = list({s[i] for i in range(len(s))})
a = [False] * 26
for c in l:
    a[ord(c) - ord("a")] = True
ans = "None"
for i in range(len(a)):
    if a[i] == False:
        ans = chr(ord("a") + i)
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
import fractions
def lcm(x, y):
    return x * y / fractions.gcd(x, y)

n = int(input())
i = 1
for _ in range(n):
    i = int(lcm(i, int(input())))
print(i)


Fixed submission:
import fractions

def lcm(x, y):
    return x * y // fractions.gcd(x, y)

n = int(input())
i = 1
for _ in range(n):
    i = lcm(i, int(input()))
print(i)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
r = [[0, 0] for _ in range(m)]
ln = []
l1 = []
for i in range(m):
    r[i][0], r[i][1] = map(int, input().split())
    if r[i][1] == n:
        ln.append(i)
    if r[i][0] == 1:
        l1.append(i)
ans = "IMPOSSIBLE"
for i in l1:
    for j in ln:
        if r[i][1] == r[j][0]:
            ans = "POSSIBLE"
            break
print(ans)


Fixed submission:
n, m = map(int, input().split())
l = [0] * n
r = []
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        r.append(b)
    if b == n:
        l[a - 1] = 1
ans = "IMPOSSIBLE"
for i in r:
    if l[i - 1] == 1:
        ans = "POSSIBLE"
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
MOD = 1000000007
ans = 1
if abs(n - m) == 1:
    for i in range(1, min(n, m) + 1):
        ans *= (i ** 2) % MOD
    ans = (ans * max(n, m)) % MOD
elif n == m:
    for i in range(1, min(n, m) + 1):
        ans *= (i ** 2) % MOD
    ans =  (ans * 2) % MOD
else:
    ans = 0
print(ans)


Fixed submission:
from math import factorial
n, m = map(int, input().split())
MOD = 1000000007
if abs(n - m) == 1:
    ans = max(n, m)
elif n == m:
    ans = 2
else:
    ans = 0
ans *= ((factorial(min(n, m)) % MOD)) ** 2
ans %= MOD
print(ans)
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007

int main(){
  long int n, i = 1;
  cin >> n;
  for(long int j = 1; j <= n; j++){
    i *= j;
    i %= MOD;
  }
  cout << i << endl;
  return 0;
}


Fixed submission:
p = 1
for i in range(int(input())):
    p = ((i + 1)*p) % (10**9 + 7)
print(p)

Buggy python submission (verdict: Time Limit Exceeded):
p = 1
for i in range(int(input())):
    p *= (i + 1)
print(p % (10**9 + 7))


Fixed submission:
p = 1
for i in range(int(input())):
    p = ((i + 1)*p) % (10**9 + 7)
print(p)

Buggy python submission (verdict: Time Limit Exceeded):
p = 1
for i in range(int(input())):
    p *= (i + 1)
print(p % (10**9 + 7))


Fixed submission:
p = 1
for i in range(int(input())):
    p = ((i + 1)*p) % (10**9 + 7)
print(p)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

total = 0
for i in range(1, n):
    for j in range(1, n):
        if i * j < n:
            total += 1
print(total)



Fixed submission:
n = int(input())

total = 0
for i in range(1, n + 1):
    j = n // i
    if n % i == 0:
        j -= 1
    total += j

print(total)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = list(map(int, input().split()))
costs = list(map(int, input().split()))

if k > n:
    k == n

if n == 2:
    print(abs(costs[-1] - costs[-2]))
else:
    dp = [float("inf") for i in range(n)]
    dp[-1] = 0

    for i in range(1, k + 1):
        curr_min = float("inf")
        for j in range(i):
            curr_min = min(abs(costs[n - i - 1] - costs[n - j - 1]) + dp[n - j - 1], curr_min)
        dp[n - i - 1] = curr_min    

    for i in range(n - k - 2, -1, -1):
        curr_min = float("inf")
        for j in range(1, k + 1):
            curr_min = min(curr_min, abs(costs[i] - costs[i + j]) + dp[i + j]) 
        dp[i] = curr_min

    print(dp[0])


Fixed submission:
n, k = list(map(int, input().split()))
costs = list(map(int, input().split()))

if k > n:
    k == n

if n == 2:
    print(abs(costs[-1] - costs[-2]))
else:
    dp = [float("inf") for i in range(n)]
    dp[-1] = 0

    for i in range(1, k + 1):
        curr_min = float("inf")
        for j in range(i):
            curr_min = min(abs(costs[n - i - 1] - costs[n - j - 1]) + dp[n - j - 1], curr_min)
        dp[n - i - 1] = curr_min    

    for i in range(n - k - 2, -1, -1):
        curr_min = float("inf")
        for j in range(1, k + 1):
            curr_min = min(curr_min, abs(costs[i] - costs[i + j]) + dp[i + j]) 
        dp[i] = curr_min

    print(dp[0])
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

d= int(input())

C = list(map(int,input().split()))
CB = [0 for i in range(len(C))]

c = sum(C)

total = 0

#print(c,C,CB)
L = []

for i in range(d):
    L.append(list(map(int,input().split())))

#print(L)

T = []

for i in range(d):
    T.append(int(input()))

#print(T)

def cnt(CB,t):
    for i in range(len(CB)):
        if i != t-1:
            CB[i] += 1
        else:
            CB[i] = 0
    
    return CB

def sumA(C,CB):
    a = 0
    for i in range(len(CB)):
        a += CB[i]*C[i]
    return a

for i in range(len(T)):
    CB = cnt(CB,T[i])
    total += L[i][T[i]-1] - sumA(C,CB)
    print(total)





Fixed submission:
# coding: utf-8
# Your code here!
import numpy as np
d= int(input())

C = list(map(int,input().split()))
CB = [0 for i in range(len(C))]

c = sum(C)

total = 0

#print(c,C,CB)
L = []

for i in range(d):
    L.append(list(map(int,input().split())))

#print(L)


#print(T)

def cnt(CB,t):
    for i in range(len(CB)):
        if i != t:
            CB[i] += 1
        else:
            CB[i] = 0
    
    return CB

def sumA(C,CB):
    a = 0
    for i in range(len(CB)):
        a += CB[i]*C[i]
    return a

for i in range(d):
    ind = np.argmax(L[i])
    CB = cnt(CB,ind)
    total += L[i][ind] - sumA(C,CB)
    print(ind+1)
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())

L = list(range(1,101))
if y != 0:
    L2 = list(map(int,input().split()))
    
    #print(L)
    for i in range(len(L2)):
        L.remove(L2[i])
        
#print(L)
#L = sorted(L)

#print(L)

t = len(L)//2

for j in range(len(L)):
#    print(t,L[t])
    if L[t] >= x:
#        print("L[t] >= x")
        if t == 0:
            print(L[t])
            break
        elif L[t-1] <= x:
            if abs(L[t]-x) < abs(L[t-1]-x):
                print(L[t])
                break
            else:
                print(L[t-1])
                break
        
        t = t//2
    else:
        if t == y-1:
            print(L[t])
            break
        elif L[t+1] >= x:
            if abs(L[t]-x) > abs(L[t+1]-x):
                print(L[t+1])
                break
            else:
                print(L[t])
                break
        t = t + (len(L)-t)//2
        
    

Fixed submission:
x,y = map(int,input().split())

L = list(range(0,102))
if y != 0:
    L2 = list(map(int,input().split()))
    
    #print(L)
    for i in range(len(L2)):
        L.remove(L2[i])
        
#print(L)
#L = sorted(L)

#print(L)

t = len(L)//2

for j in range(len(L)):
#    print(t,L[t])
    if L[t] >= x:
#        print("L[t] >= x")
        if t == 0:
            print(L[t])
            break
        elif L[t-1] <= x:
            if abs(L[t]-x) < abs(L[t-1]-x):
                print(L[t])
                break
            else:
                print(L[t-1])
                break
        
        t = t//2
    else:
        if t == y-1:
            print(L[t])
            break
        elif L[t+1] >= x:
            if abs(L[t]-x) > abs(L[t+1]-x):
                print(L[t+1])
                break
            else:
                print(L[t])
                break
        t = t + (len(L)-t)//2
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Your code here!
n = int(input())
L = list(map(int,input().split()))
a = 1
for i in L:
    a = a*i

if a <= 10**18:
    print(a)
else:
    print(-1)

Fixed submission:
n = int(input())
L = list(map(int,input().split()))
a = 1
L = sorted(L)
for i in L:
    a = a*i
    if a == 0:
        break
    if a > 10**18:
        break
 
if a <= 10**18:
    print(a)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
    
dic = {}
m = 0

for i in L:
    if i in dic:
        dic[i] = dic[i] + 1
    else:
        dic[i] = 1
        
    if m < dic[i]:
        m = dic[i]

n = []
for i in dic:
    if dic[i] == m:
        n.append(i)
n.sort()
for i in n:
    print(i)

Fixed submission:

N = int(input())
L = [ input() for i in range(N)]
#print(L)
    
dic = {}
m = 0

for i in L:
    if i in dic:
        dic[i] = dic[i] + 1
    else:
        dic[i] = 1
        
    if m < dic[i]:
        m = dic[i]

n = []
for i in dic:
    if dic[i] == m:
        n.append(i)
n.sort()
for i in n:
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

s = input().split(" ")
judge = False

for i in range(N):
  if s[i+1:N].count(s[i]) > 0:
      judge = True

if judge == True:
  print("NO")
else:
  print("YES")







Fixed submission:
N = int(input())

s = input().split(" ")

b = len(s)

s = set(s)

a = len(s)



if a == b:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

s = input().split(" ")

judge = False

for i in range(N):

  if s.count(s[i]) > 1:
      judge = True
      break

if judge == True:
  print("NO")
else:
  print("YES")







Fixed submission:
N = int(input())

s = input().split(" ")

b = len(s)

s = set(s)

a = len(s)



if a == b:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

s = input().split(" ")

judge = False

for i in range(N):

  if s.count(s[i]) > 1:
      judge = True

if judge == True:
  print("NO")
else:
  print("YES")







Fixed submission:
N = int(input())

s = input().split(" ")

b = len(s)

s = set(s)

a = len(s)



if a == b:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

s = input().split(" ")

judge = False

for i in range(N):

  for j in range(i+1,N):
    if s[i] == s[j]:
      judge = True
      break

  if judge == True:
    break

if judge == True:
  print("NO")
else:
  print("YES")







Fixed submission:
N = int(input())

s = input().split(" ")

b = len(s)

s = set(s)

a = len(s)



if a == b:
  print("YES")
else:
  print("NO")