Harryxun/stf_run huggingface dataset:
# ライブラリのインポート
import numpy as np


# メイン関数
def main():
    # 入力データ
    s = input()
    t = input()

    # dpテーブルの作成
    dp = np.zeros((len(s) + 1, len(t) + 1), dtype='int')
    for i in range(len(s)):
        for j in range(len(t)):
            if s[i] == t[j]:
                dp[i+1][j+1] = dp[i][j] + 1
            else:
                dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

    # 部分列の復元
    ans = ''
    i = len(s)
    j = len(t)
    while i != 0 and j != 0:
        if dp[i][j] == dp[i-1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j-1]:
            j -= 1
        else:
            i -= 1
            j -= 1
            ans = s[i] + ans

    # 解答の出力
    print(ans)
    return


# 実行
if __name__ == '__main__':
    main()


### FIXED CODE ###

# メイン関数
def main():
    # 入力データ
    s = input()
    t = input()

    # dpテーブルの作成
    dp = [[0] * (len(t)+1) for i in range(len(s)+1)]
    for i in range(len(s)):
        for j in range(len(t)):
            if s[i] == t[j]:
                dp[i+1][j+1] = dp[i][j] + 1
            else:
                dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

    # 部分列の復元
    ans = ''
    i = len(s)
    j = len(t)
    while i != 0 and j != 0:
        if dp[i][j] == dp[i-1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j-1]:
            j -= 1
        else:
            i -= 1
            j -= 1
            ans = s[i] + ans

    # 解答の出力
    print(ans)
    return


# 実行
if __name__ == '__main__':
    main()
N=int(input())
H=list(map(int,input().split()))

cnt=0
l=[]
for i in reversed(range(1,N)):
	if H[i]<=H[i-1]:
		cnt+=1
	else:
		l.append(cnt)
		cnt=0

print(max(l))

### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))

cnt=0
l=[]

if N==1:
	cnt=0
	l.append(cnt)
else:
	for i in reversed(range(1,N)):
		if H[i]<=H[i-1]:
			cnt+=1
			if i==1:
				l.append(cnt)
		else:
			l.append(cnt)
			cnt=0

print(max(l))
a, b = int(input())

if (a*b) % 2 == 0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

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

if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
k = int(input())
 
def gcd2(a,b):
    return gcd2(b,a%b)

def gcd3(a,b,c):
    return gcd2(gcd2(a,b), c)

ans = 0
for i in range(1,k+1):
    for j in range(i,k+1):
        for m in range(j, k+1):
            if i == j == m:
                ans += gcd3(i,j,m)
            elif i == j or j == m:
                ans += gcd3(i,j,m)*3
            else:
                ans += gcd3(i,j,m)*6

print(ans)

### FIXED CODE ###

k = int(input())
 
def gcd2(a,b):
    if b == 0:
        return a
    return gcd2(b,a%b)

def gcd3(a,b,c):
    return gcd2(gcd2(a,b), c)

ans = 0
for i in range(1,k+1):
    for j in range(i,k+1):
        for m in range(j, k+1):
            if i == j == m:
                ans += gcd3(i,j,m)
            elif i == j or j == m:
                ans += gcd3(i,j,m)*3
            else:
                ans += gcd3(i,j,m)*6

print(ans)
import sys
input = sys.stdin.readline
N = int(input())
a = []
l = [i for i in range(N)]
r = [i for i in range(N)]
for i in range(N):
  x, y = map(int, input().split())
  a.append((x, y))
l.sort(key = lambda x: -a[x][1])
r.sort(key = lambda x: a[x][0])
#print(l, r)
res = 0
vis = [0] * N
x = 0
for i in range(N):
  if i % 2:
    t = l[-1]
    y = a[l.pop()][1]
    while vis[t]:
      t = l.pop()
      y = a[t][1]
      vis[t] = 1
      if len(l) == 0: break
    vis[t] = 1
    res += x - min(x, y)
    x = min(x, y)
  else:
    t = r[-1]
    y = a[r.pop()][0]
    while vis[t]:
      t = r.pop()
      y = a[t][0]
      vis[t] = 1
      if len(r) == 0: break
    vis[t] = 1
    res += max(x, y) - x
    x = max(x, y)
res += abs(x)
rres = 0
l = [i for i in range(N)]
r = [i for i in range(N)]
l.sort(key = lambda x: -a[x][1])
r.sort(key = lambda x: a[x][0])
vis = [0] * N
x = 0
for i in range(N):
  if i % 2 == 0:
    t = l[-1]
    y = a[l.pop()][1]
    while vis[l[-1]]:
      t = l.pop()
      y = a[t][1]
      vis[t] = 1
      if len(l) == 0: break
    vis[t] = 1
    rres += x - min(x, y)
    x = min(x, y)
  else:
    t = r[-1]
    y = a[r.pop()][1]
    while vis[r[-1]]:
      t = r.pop()
      y = a[t][1]
      if len(r) == 0: break
    vis[t] = 1
    rres += max(x, y) - x
    x = max(x, y)
rres += abs(x)
print(max(res, rres))

### FIXED CODE ###

import sys
input = sys.stdin.readline
N = int(input())
a = []
l = [i for i in range(N)]
r = [i for i in range(N)]
for i in range(N):
  x, y = map(int, input().split())
  a.append((x, y))
l.sort(key = lambda x: -a[x][1])
r.sort(key = lambda x: a[x][0])
#print(l, r)
res = 0
vis = [0] * N
x = 0
for i in range(N):
  #print(l, r, vis, x, res)
  if i % 2 == 1 and (len(l) > 0):
    t = l[-1]
    y = a[l.pop()][1]
    while vis[t]:
      t = l.pop()
      y = a[t][1]
      vis[t] = 1
      if len(l) == 0: break
    vis[t] = 1
    if not x in range(a[t][0], a[t][1]):
      res += x - min(x, y)
      x = min(x, y)
  elif i % 2 == 0 and (len(r) > 0):
    t = r[-1]
    y = a[r.pop()][0]
    while vis[t]:
      t = r.pop()
      y = a[t][0]
      vis[t] = 1
      if len(r) == 0: break
    vis[t] = 1
    if not x in range(a[t][0], a[t][1]):
      res += max(x, y) - x
      x = max(x, y)
res += abs(x)
#print(res)
rres = 0
l = [i for i in range(N)]
r = [i for i in range(N)]
l.sort(key = lambda x: -a[x][1])
r.sort(key = lambda x: a[x][0])
vis = [0] * N
x = 0
for i in range(N):
  #print(l, r, vis, x, rres)
  if i % 2 == 0 and (len(l) > 0):
    t = l[-1]
    y = a[l.pop()][1]
    while vis[t]:
      t = l.pop()
      y = a[t][1]
      vis[t] = 1
      if len(l) == 0: break
    vis[t] = 1
    if not x in range(a[t][0], a[t][1]):
      rres += x - min(x, y)
      x = min(x, y)
  elif i % 2 == 1 and (len(r) > 0):
    t = r[-1]
    y = a[r.pop()][0]
    while vis[t]:
      t = r.pop()
      y = a[t][0]
      vis[t] = 1
      if len(r) == 0: break
    vis[t] = 1
    if not x in range(a[t][0], a[t][1]):
      rres += max(x, y) - x
      x = max(x, y)
rres += abs(x)
print(max(res, rres))
S = input()

n = len(S)
ans = "No"
if S[:n//2] == S[n//2+1:][::-1]:
    S1 = S[:(n-1)//2]
    n1 = len(S1)
    if n1 % 2 == 1:
        if S1[:n1//2] == S1[(n1+1)//2:][::-1]:
            S2 = S[(n+3)//2-1:]
            n2 = len(S2)
        if S2[:n2//2] == S2[(n2+1)//2:][::-1]:
            ans = "Yes"

print(ans)

### FIXED CODE ###

S = input()

n = len(S)
ans = "No"
if S[:n//2] == S[n//2+1:][::-1]:
    S1 = S[:(n-1)//2]
    n1 = len(S1)
    if S1[:n1//2] == S1[(n1+1)//2:][::-1]:
        S2 = S[(n+3)//2-1:]
        n2 = len(S2)
        if S2[:n2//2] == S2[(n2+1)//2:][::-1]:
            ans = "Yes"

print(ans)
from operator import itemgetter
def main():
    N,M = map(int,input().split())
    sc = [list(map(int,input().split())) for _ in range(M)]
    s = [sc[i][0] for i in range(M)]
    c = [sc[i][1] for i in range(M)]
    ans = [0]*max(s)
    ans[0] = 1
    for i in range(M):
        if s[i]-1 == 0:
            if ans[0] == 1 or ans[0] == c[i]:
                ans[0] = c[i]
            else:
                ans = "-1"
                break
        if ans[s[i]-1] == 0 or ans[s[i]-1] == c[i]:
            ans[s[i]-1] = c[i]
        else:
            ans = "-1"
            break
    if ans == "-1":
        ans == "-1"
    else:
        ans = list(map(str,ans))
        if ans == ["0"]:
            print("-1")
        else:
            print(*ans,sep="")

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    N,M = map(int,input().split())
    sc = [list(map(int,input().split())) for _ in range(M)]
    if M == 0:
        if N != 1:
            print(10**(N-1))
        else:
            print(0)
    else:
        ans = "-1"
        flag = False
        for i in range(10**N):
            if flag:
                break
            tmp = str(i)
            if len(tmp) < N:
                continue
            for j in range(M):
                if tmp[sc[j][0]-1] != str(sc[j][1]):
                    break
                if j == M-1:
                    ans = i
                    flag = True
        print(ans)

if __name__ == '__main__':
    main()
A,B=map(int,input(),split())
print(['Yay!',':('][A>8 or B>8])

### FIXED CODE ###

A,B=map(int,input().split())
print(['Yay!',':('][A>8 or B>8])
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
l = [x[i]-x[i-1] for i in range(1,m)]
ans = x[m-1] - x[0] 
if len[x] == 1:
    print(ans)
else:
    for i in range(n-1):
        ans -= max(l)
        l.remove(max(l))
    print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
l = [x[i]-x[i-1] for i in range(1,m)]
l.sort(reverse=True)
ans = x[m-1] - x[0]
if n >= m:
    print(0)
else:
    for i in range(n-1):
        ans -= l[i]
    print(ans)
string_list = split(input())
D = int(string_list[0])
T = int(string_list[1])
S = int(string_list[2])
kyori = T * S
if D<=kyori:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

string_list = input().split(' ')
D = int(string_list[0])
T = int(string_list[1])
S = int(string_list[2])
kyori = T * S
if D<=kyori:
  print('Yes')
else:
  print('No')
import itertools

x = int(input())

y = itertools.combinations(range(-80,80), 2)
for n in y:
    if (n[0]**5 - n[1]**5) == x:
        print(n[0], n[1])
        break
    elif (n[1]**5 - n[0]**5) == x:
        print(n[1], n[0])
        break

### FIXED CODE ###

a = input()

if a == "ABC":
    print("ARC")
else:
    print("ABC")
from collections import Counter
[N, X, Y] = [int(item) for item in input().split()]
X -= 1
Y -= 1
gyoretu=[]
for i in range(N):
    row=[]
    for j in range(N):
        if i == j:
            row[i][j]=0
        elif abs(i - j) == 1 or i == X and j == Y or i == Y and j == X:
            row[i][j]=1
        else:
            row[i][j] = 2000
    gyoretu.append(row)
for k in range(N):
    for i in range(N):
        for j in range(N):
            if gyoretu[i][j]< gyoretu[i][k] + gyoretu[k][j]:
                gyoretu[i][j] =gyoretu[i][k] + gyoretu[k][j]
array=[]
for i in range(N):
        array+=gyoretu[i][i:]
c=Counter(array)
for i in range(1, N):
    print(c[i])

### FIXED CODE ###

[N, X, Y] = [int(item) for item in input().split()]
X -= 1
Y -= 1
count=[0 for _ in range(N)]
for i in range(N):
    for j in range(i,N):
        count[min(abs(i-j),abs(i-X)+1+abs(Y-j),abs(i-Y)+1+abs(X-j))]+=1
#print(array)


for i in range(1,N):
        print(count[i])

#print(count)
N = int(input())
A_i = list(map(int, input().split()))
uq_A_i = list(set(A_i))
C = ["0\n"] * N
for i in uq_A_i:
    C[i - 1] = "{}".format(A_i.count(i) + "\n")
print("".join(C))


### FIXED CODE ###

N = int(input())
A_i = list(map(int, input().split()))
C = [0] * N
for i in A_i:
    C[i - 1] += 1
print(*C)
# -*- coding:utf8 -*-

a[0],b[1] = sorted(list(map(int,input().split())))
ans = a + ((b - a) / 2) if (b - a) % 2 == 0 else 'IMPOSSIBLE'
print(ans)

### FIXED CODE ###

# -*- coding:utf8 -*-

l = sorted(list(map(int,input().split())))
a, b = l[0], l[1]
ans = int(a + ((b - a) / 2)) if (b - a) % 2 == 0 else 'IMPOSSIBLE'
print(ans)
inr = lambda: list(map(int, input().split()))

N, Y = inr()

lmn = [-1, -1, -1]

for x in range(N+1):
    flag = 0
    Y_rem = Y - x * 10000
    N_rem = N - x

    if Y_rem >= 0 and N_rem >= 0:
        flag = 1

    if flag = 1:
        for y in range(N_rem+1):
            flag_2  = 0
            Y_rem_2 = Y_rem - y * 5000
            z       = N_rem - y
            if Y_rem_2 >= 0 and z >= 0:
                flag_2 = 1
            if Y_rem_2 == z *1000 and flag_2 == 1:
                lmn[0] = x
                lmn[1] = y
                lmn[2] = z

### FIXED CODE ###

inr = lambda: list(map(int, input().split()))

N, Y = inr()

lmn = [-1, -1, -1]

for x in range(N+1):
    for y in range(N-x+1):
        z = N - x - y
        oto_sum = 10000 * x + 5000 * y + 1000 * z
        if z >= 0 and oto_sum == Y:
            print(x, y, z)
            exit()

print(-1, -1, -1)
while True:
    if a == 0 and b ==0:
        break
    else:
        a, b = map(int, input().split())
        for j in range(a):
            for i in range(b):
                print("#", end="")
            print()


### FIXED CODE ###

while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print("#" * W)
    print()
n, m  = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
cb = []
for i in range(m):
  b, c = map(int, input().split())
  cb.append((c,b))
cb.sort(reverse=True)

j = 0
for i in range(m):
  k = 0
  while k<cb[i][1] and a[k+j]<cb[i][0] and k+j<n:
    a[k+j] = cb[i][0]
    k += 1
  j += k
  if j == n:
    break
    
print(sum(a))

### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
cb=[]
for i in range(m):
    b, c = map(int, input().split())
    cb.append([c,b])
cb.sort(reverse=True)
k=0
for i in range(m):
    j=0
    while j<cb[i][1] and k+j<n and a[k+j]<cb[i][0]:
        a[k+j] = cb[i][0]
        j+=1
    k+=j
    if k==n:
        break
print(sum(a))
S=list(input().split())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[1])

### FIXED CODE ###

S=list(input())
K=int(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
         count+=1
    else:
        break
if K<=count:
    print(1)
else:
    print(S[count])
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n;
    int a[110];
    cin>>n;
    for(int i=0;i<n;i++) cin>>a[i];
       

    sort(a,a+n,greater<int>());//a[0:n]
    int Alice=0;
    int Bob=0;
    for(int i=0;i<n;i++){
        if(i%2==0){//even Alice
            Alice += a[i];
        }
        else{
            Bob += a[i];
        }
    }
    cout<<Alice-Bob<<endl;

}


### FIXED CODE ###

#088B
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
#print(a)

player_a=[]
player_b=[]

for i in range(len(a)):
	if(i==0 or i%2==0):
		player_a.append(a[i])
	else:
		player_b.append(a[i])

sum_a=sum(player_a)
sum_b=sum(player_b)

ans=sum_a-sum_b

print(ans)
n, l, t = map(int, input().split())

arr = []
for i in range(n):
    x, w = map(int, input().split())

    if w == 1:
        arr.append((x+t) % l)
        s += (x+t) // l
    else: # W == 2:
        arr.append((x-t) % l)
        s += (x-t) // l

arr.sort()
s %= n
arr = arr[s:] + arr[:s]
print(*[i for i in arr], sep='\n')

### FIXED CODE ###

n, l, t = map(int,input().split())

c = []
s = 0

for i in range(n):
    x, w = map(int,input().split())
    if w == 1:
        c.append((x+t)%l)
        s += (x+t)//l
    else: # w == 2
        c.append((x-t)%l)
        s += (x-t)//l

c.sort()
s %= n
c = c[s:] + c[:s]
print(*[i for i in c], sep='\n')
n,d=map(int,input())
cnt=0
for i in range(n):
  x,y =map(int,input())
  if x**2+y**2 <= d**2:
    cnt+=1
print(cnt)

### FIXED CODE ###

n,d=map(int,input().split())
cnt=0
for i in range(n):
  x,y =map(int,input().split())
  if x**2+y**2 <= d**2:
    cnt+=1
print(cnt)
A,B,K=list(map(int,input().split()))
count=0
z=[A,B]
for i in range(1,max(z)+1):
  if (A%i==0)and(B%i==0):
    count+=1
    if count==K:
      ans=count
      break
print(ans)

### FIXED CODE ###

a=list(map(int,input().split()))
A=a[0]
B=a[1]
C=a[2]
if B>=A*C:
  answer=C
else:
  answer=B//A
print(answer)
import sys

num = int(input())
input_line = sys.stdin.readlines()
inputnum = [int(x.strip()) for x in input_line]

diff = []
for j in range(num):
    for i in range(j):
        diff.append(inputnum[j] - inputnum[i])
print(max(*diff))

### FIXED CODE ###

import sys

n = int(input())
r0 = int(input())
r1 = int(input())
mx = r1 - r0
mn = min(r1, r0)

for i in map(int, sys.stdin.readlines()):
    if mx < i - mn:
        mx = i - mn
    if mn > i:
        mn = i

print(mx)
import math
a=[input() for i in range(5)]
si=min([a[i][-1] for i in range(5)if a[i][-1]!='0'])
ans=[math.ceil(int(i)/10)*10 for i in a]
print(sum(ans)+int(si)-10)


### FIXED CODE ###

import math
a=[input() for i in range(5)]
nzero=['99999']
for i in a:
    if i[-1]!='0':
        nzero+=[i[-1]]
ans=sum([math.ceil(int(i)/10)*10 for i in a])
h=min(nzero)

if h=='99999':
    print(ans)
else:
    print(ans-10+int(h))
#ABC148.C
A,B = map(int,input().split())
import math
def lcm(x,y):
    return x*y//math.gcd(x,y)
print(lcm(A,B))

### FIXED CODE ###

#ABC148.C
import fractions
A,B = map(int,input().split())
def lcm(x,y):
    return x*y//fractions.gcd(x,y)
print(lcm(A,B))
N = input()
Sum = 0

for k in range(N):
    i = k+1

    if i % 3 != 0 and i % 5 != 0:
        Sum = Sum + i

print(str(Sum))

### FIXED CODE ###

N = input()
Sum = 0

for k in range(int(N)):
    i = k+1

    if i % 3 != 0:
        if i % 5 != 0:
            Sum = Sum + i

print(Sum)
# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))

ans = 0
new_a = A.copy()
while 1:
    new_a = [a // 2 if a % 2 == 0 else -1 for a in new_a]
    if -1 in new_a:
        print(ans)
        exit()
    ans += 1

print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-

S = input()
dream_set = {"dream", "dreamer", "erase", "eraser"}
# 感動的計画法やるぞ

while len(S) > 0:
    if S.endswith("dream") or S.endswith("erase"):
        S = S[:-5]
    elif S.endswith("eraser"):
        S = S[:-6]
    elif S.endswith("dreamer"):
        S = S[:-7]
    else:
        print("NO")
        exit()

print("YES")
minlist=[]
maxlist=[]

n,m=map(int,input().split())
for i in range(m):
  l,r=list(map(int,input().split()))
  minlist.append(l)
  if r>0:
    maxlist.append(r)
ans=0
dif=max(minlist)-min(maxlist)
if(diff>=0):
  ans=diff+1
else:
  ans=0
print(ans)

### FIXED CODE ###

minlist=[]
maxlist=[]
 
n,m=map(int,input().split())
for i in range(m):
  l,r=list(map(int,input().split()))
  minlist.append(l)
  if r>0:
    maxlist.append(r)
ans=0
dif=min(maxlist)-max(minlist)
if(dif>=0):
  ans=dif+1
else:
  ans=0
print(ans)
n=int(input())
s=[]
for x in range(n):
    s.append(input())
m=int(input())
t=[]
for y in range(m):
    t.append(input())
m=0
for i in range(n):
    v=s[i]
    c=0
    for k in range(i,n):
        if v==s[k]:
            c+=1
    for j in range(m):
        if v==t[j]:
            c-=1
    if c>m:
        m=c
print(m)

### FIXED CODE ###

n=int(input())
s=[]
for x in range(n):
    s.append(input())
m=int(input())
t=[]
for y in range(m):
    t.append(input())
q=0
for i in range(n):
    v=s[i]
    c=0
    for k in range(i,n):
        if v==s[k]:
            c+=1
    for j in range(m):
        if v==t[j]:
            c-=1
    if c>q:
        q=c
print(q)
from sys import stdin,stdout
from collections import defaultdict
import math
#input=stdin.readline
#def print(x):stdout.write(str(x)+'\n')
for _ in range(int(input())):
    s=input()
    if s=='RRR':
        print(3)
    elif 'RR' in s:
        print(2)
    elif 'R' in s:
        print(1)
    else:
        print(0)

### FIXED CODE ###

from sys import stdin,stdout
from collections import defaultdict
import math
#input=stdin.readline
#def print(x):stdout.write(str(x)+'\n')
s=input()
if s=='RRR':
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)
sys.setrecursionlimit(1000000)
n = int(input())
l = list(map(int, input().split()))
b = 1
for a in l:
    b = b * a 
if b > 10 ** 18:
    b = -1
print(b)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

def input():
    return sys.stdin.readline()[:-1]
n = int(input())
l = list(map(int, input().split(" ")))
output = 1

if 0 in l:
    print(0)
    sys.exit()

for i in range(n):
    output = output * int(l[i])
    if output > 10 ** 18:
        output = -1
        break
print(output)
N, A, B =[int(x) for x in input().split()]
line = []

for i in range(N/(A+B)):
    for x in range(A):
        line.append("b")
    for y in range(B):
        line.append("r")

print(line[0:N:].count("b"))

### FIXED CODE ###

N, A, B =[int(x) for x in input().split()]

if A!=0:
    ans = N//(A+B)*A
    mod = N%(A+B)
    plus = min(mod, A)
    c = ans + plus 
else:
    c = 0
print(c)
import sys
a=int(input())
b=list(map(int,input().split()))
c=[]
for i in range(a):
  c+=b[i]
  for i in range(len(c)):
    if b[i]==c[i]:
      print('NO')
      sys.exit()
print('YES')

### FIXED CODE ###

a=int(input())
b=list(map(int,input().split()))
d=len(b)
c=len(set(b))
if c==d:
  print('YES')
else:
  print('NO')
def xx (a,b)
  
a = input()
b = input()

  if a*b %2 == 0:
    print("Even")
  else
    print("Odd")
    


### FIXED CODE ###

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

print("Even" if a*b%2==0 else "Odd")
s = [input() for i in range(3)]
print(s)

### FIXED CODE ###

s = [input() for i in range(2)]
predict = s[0]
result = s[1]
count = 0
for i in range(3):
    if predict[i] == result[i]:
        count += 1
print(count)
def grand_garden(count, hlist):
    nonzero = False
    for i, h_i in enumerate(hlist):
        if h_i != 0:
            nonzero = True
            hlist[i] = hlist[i] -1
        elif nonzero:
            break


    if nonzero:
        return grand_garden(count + 1, hlist)
    else:
        return count






n = int( input())
hlist = input().split()
for i, h_i in enumerate(hlist):
    hlist[i] = int(hlist[i])

count = grand_garden(0, hlist)

print(count)



### FIXED CODE ###


def grand_garden(hlist):
    all_zero = False
    count = 0
    while(not all_zero):
        nonzero = False
        for i, h_i in enumerate(hlist):
            if h_i != 0:
                nonzero = True
                hlist[i] = hlist[i] -1
            elif nonzero:
                break


        if nonzero:
            count = count + 1
        else:
            all_zero = True


    return count




n = int( input())
hlist = input().split()
for i, h_i in enumerate(hlist):
    hlist[i] = int(hlist[i])

count = grand_garden(hlist)

print(count)
print(len(set([int(input()) for i in range(int(input()))]))

### FIXED CODE ###

print(len(set([int(input()) for i in range(int(input()))])))
##
N = int(input())
N_List = list(map(int,input().split()))
Four_List = [i for i in N_List if i % 4 == 0]
Two_List = [i for i in N_List if i % 2 == 0]
if len(Two_List) > 0:
    N = N - (len(Two_List) - len(Four_List)) + 1

if N // 2 <= len(Four_List):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N,M = map(int,input().split())
print((N-1)*(M-1))
input()
A=list([int(i) for i in input().split()])
print(min(A),max(A),sum(A))


### FIXED CODE ###

input()
A=list([int(i) for i in input().split()])
print(min(A),max(A),sum(A))
import math, fractions


def main():
    A, B = map(int, input().split())
    n = fractions.gcd(A, B)
    print(num_prime_factor(n))

def num_prime_factor(n):
    
    if n == 1:
        return 1
    
    ret = 1
    curser = 2
    if n % cursor == 0:
        ret += 1
        n = n // cursor
        while n % cursor == 0:
            n = n // cursor
    
    cursor = 3
    if n % cursor == 0:
        ret += 1
        n = n // cursor
        while n % cursor == 0:
            n = n // cursor
        cursor += 2

    if n != 1:
        ret += 1
        
    return ret

if __name__ == "__main__":
    main()

### FIXED CODE ###

import math, fractions


def num_prime_factor(n):
    
    ret = 0

    for i in range(1, int(math.sqrt(n)) + 2):

        composite = False

        if n % i == 0:
            ret += 1
            n = n / i

            if i != 1:
                while n % i == 0:
                    n = n / i

            if n == 1:
                break

            for j in range(2, int(math.sqrt(n)) + 2):
                if n % j == 0:
                    composite = True
                    break

            if not composite:
                ret += 1
                break

    return ret

if __name__ == "__main__":
    A, B = map(int, input().split())
    n = fractions.gcd(A, B)
    print(num_prime_factor(n))
n,k=map(int,input().split())
print(0 if n%k=0 else 1)

### FIXED CODE ###

n,k=map(int,input().split())
print(0 if n%k==0 else 1)