Harryxun/stf_run huggingface dataset:
n = input()
print("Yes" if n%sum(map(int,n))==0 else "No")


### FIXED CODE ###

n = input()
print("Yes" if int(n)%sum(map(int,n))==0 else "No")
def resolve():
    '''
    code here
    '''
    import collections
    N, M = [int(item) for item in input().split()]
    Xs = [int(item) for item in input().split()]
    if N < M-1:
        Xs.sort()
        ds = [Xs[i] - Xs[i-1] for i in range(1, M)]
        ds.sort()
        # print(ds)
        print(sum(ds[:-1*(N-1)]))
    elif M - N == 1:
        Xs.sort()
        ds = [Xs[i] - Xs[i-1] for i in range(1, M)]
        ds.sort()
        # print(ds)
        print(sum(ds[0]))
        
    else:
        print(0)


if __name__ == "__main__":
    resolve()


### FIXED CODE ###

def resolve():
    '''
    code here
    '''
    import collections
    N, M = [int(item) for item in input().split()]
    Xs = [int(item) for item in input().split()]
    if N < M:
        Xs.sort()
        ds = [Xs[i] - Xs[i-1] for i in range(1, M)]
        ds.sort()
        # print(ds)
        print(sum(ds[:M-N]))

    else:
        print(0)


if __name__ == "__main__":
    resolve()
(n,m)=map(int,input().split())
a=input().split()
a=list(map(int,a))
l=[]
k=0
a=sorted(a)
for i in range(m-1):
    d=abs(a[i]-a[i+1])
    k=k+d
    l.append(d)
# k=k-d
c=n-k
l.append(c)
l=sorted(l)

print(n-l[-1])

### FIXED CODE ###

a = input()
if (a[2]==a[3]) & (a[4] == a[5]):
    print('Yes')
else:
	print('No')
n,k = map(int,input().split())
p=list(map(int,input().split()))
ans = 0
for i in range(k):
  ans += (p[i]+1)/2
for i in range(n-k):
  ans = max(ans,ans-(p[i]+1)/2+(p[k+i+1]+1)/2)
print(ans)
  
  

### FIXED CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
for i in range(n):
  p[i]=(p[i]+1)/2
a=0
for i in range(k):
  a+=p[i]
b=[a]
for j in range(1,n-k+1):
  c=b[j-1]-p[j-1]+p[j+k-1]
  b.append(c)
b.sort(reverse=True)
print(b[0])
numList = input().split()
numList = list(map(int, numList))
commandList = [
	[2,0,0],
	[0,2,0],
	[0,0,2],
	[0,1,1],
	[1,0,1],
	[1,1,0]
]
numListList = [numList]

def search(depth):
	global numListList
	tmpList = []
	for numList in numListList:
		for command in commandList:
			sumedList = sumList(numList, command)
			if check(sumedList, depth+1):
				return
			tmpList.append(sumedList)
	numListList = tmpList
	search(depth+1)

def sumList(list1, list2):
	return [list1[0]+list2[0], list1[1]+list2[1], list1[2]+list2[2]]

def check(list1, count):
	if list1[0] == list1[1] and list1[1] == list1[2]:
		print(count)
		return True

	if list1[0] == list1[1]:
		if list1[0] > list1[2] and (list1[0]-list1[2])%2 == 0:
			print(int(count+(list1[0]-list1[2])/2))
			return True
		if list1[2] > list1[0]:
			print(int(count+(list1[2]-list1[0])))
			return True

	if list1[1] == list1[2]:
		if list1[1] > list1[0] and (list1[1]-list1[0])%2 == 0:
			print(int(count+(list1[0]-list1[2])/2))
			return True
		if list1[0] > list1[1]:
			print(int(count+(list1[0]-ist1[1])))
			return True

	if list1[0] == list1[2]:
		if list1[0] > list1[1] and (list1[0]-list1[1])%2 == 0:
			print(int(count+(list1[0]-list1[1])/2))
			return True
		if list1[1] > list1[0]:
			print(int(count+(list1[1]-list1[0])))
			return True

	

search(0)

### FIXED CODE ###

numList = input().split()
numList = list(map(int, numList))
commandList = [
	[2,0,0],
	[0,2,0],
	[0,0,2],
	[0,1,1],
	[1,0,1],
	[1,1,0]
]
numListList = [numList]

def search(depth):
	global numListList
	tmpList = []
	for numList in numListList:
		for command in commandList:
			sumedList = sumList(numList, command)
			if check(sumedList, depth+1):
				return
			tmpList.append(sumedList)
	numListList = tmpList
	search(depth+1)

def sumList(list1, list2):
	return [list1[0]+list2[0], list1[1]+list2[1], list1[2]+list2[2]]

def check(numList, count):
	if numList[0] == numList[1] and numList[1] == numList[2]:
		print(count)
		return True

	if numList[0] == numList[1]:
		return check2(numList[0], numList[2], count)

	if numList[1] == numList[2]:
		return check2(numList[1], numList[0], count)

	if numList[0] == numList[2]:
		return check2(numList[0], numList[1], count)

	return False

def check2(num1, num2, count):
	if num1 > num2:
		if (num1-num2)%2 == 0:
			print(int(count+(num1-num2)/2))
			return True
		else:
			print(int(count+(num1-num2)/2)+2)
			return True
	else:
		print(int(count+(num2-num1)))
		return True

if check(numList, 0):
	pass
else:
	search(0)
s,w=int(input()),int(input())
if w>=s:
  print("unsafe")
else:
  print("safe")

### FIXED CODE ###

s,w=map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")
N,M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for _ in range(M)]

A.sort()
BC.sort(reverse=True,key = lambda x:x[1])

pt,card,index = 0,BC[0][1],0
while A[pt] < card:
    for i in range(BC[index][0]):
        if A[pt] < card:
            A[pt] = card
        pt += 1
    index += 1
    if index < M:
        card = BC[index][1]
    else:
        break

print(sum(A))


### FIXED CODE ###

#要修正　方針は合っているようだが・・・
N,M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for _ in range(M)]

A.sort()
BC.sort(reverse=True,key = lambda x:x[1])

pt,card,index = 0,BC[0][1],0
while True:
    for i in range(BC[index][0]):
        if pt < N:
            A[pt] = max(A[pt],card)
        else:
            break
        pt += 1

    index += 1
    if index < M:
        card = BC[index][1]
    else:
        break

print(sum(A))
while True:
      x=input().split(" ")
      a=int(x[0])
      op=x[1]
      b=int(x[2])
      if op =="+":
        print(a+b)
      elif op=="-":
          print(a-b)
      elif op=="*":
          print(a*b)
      elif op=="/":
          print(a/b)
      elif op =="?":
         break


### FIXED CODE ###

while True:
    x=input().split(" ")
    a=int(x[0])
    op=x[1]
    b=int(x[2])
    if op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)
    elif op == "?":
        break
lis = list(input().split("/"))
if lis[1] <= 4:
  print("Heisei")
else:
  print("TBD")

### FIXED CODE ###

lis = list(map(int,input().split("/")))
if lis[1] <= 4:
  print("Heisei")
else:
  print("TBD")
N = int(input)
if N == 1:
    print("Hello World")
else :
    A , B = int(input)
    print(A+B)

### FIXED CODE ###

N = int(input())
if N == 1:
    print("Hello World")
else :
    A  = int(input())
    B = int(input())
    print(A+B)
r = raw_input()
g = raw_input()
k = 2*g - r
print k

### FIXED CODE ###

r = int(raw_input())
g = int(raw_input())
k = 2*g - r
print k
a, t = input().split()
print("H" if a == "H" and b =="H" or a == "D" and b == "D" else "D")

### FIXED CODE ###

a, b = input().split()
print("H" if a == "H" and b =="H" or a == "D" and b == "D" else "D")
from collections import deque
X, Y, A, B, C = map(int,input().split())
p = sorted(list(map(int,input().split())))[::-1]
q = sorted(list(map(int,input().split())))[::-1]
r = sorted(list(map(int,input().split())))[::-1]
p = deque(p)
q = deque(q)
r = deque(r)
ans = 0

while len(r) > 0 and X > 0 and p[0] > r[0]:
    ans += p.popleft()
    X -= 1
while len(r) > 0 and Y > 0 and q[0] > r[0]:
    ans += q.popleft()
    Y -= 1

while X > 0 or Y > 0:
    if X > 0 and Y > 0:
        if p[0] > q[0]:
            ans += r.popleft()
            Y -= 1
        else:
            ans += r.popleft()
            X -= 1
    elif X == 0 and Y > 0:
        if len(r) == 0:
            ans += q.popleft()
            Y -= 1
        elif r[0] > q[0]:
            ans += r.popleft()
            Y -= 1
        else:
            ans += q.popleft()
            Y-= 1
    else:
        if len(r) == 0:
            ans += p.popleft()
            X -= 1
        elif r[0] > p[0]:
            ans += r.popleft()
            X -= 1
        else:
            ans += p.popleft()
            X -= 1
print(ans)


### FIXED CODE ###

X, Y, A, B, C = map(int,input().split())
p = sorted(list(map(int,input().split())))[::-1][:X]
q = sorted(list(map(int,input().split())))[::-1][:Y]
r = sorted(list(map(int,input().split())))
print(sum(sorted((p+q+r),reverse = True)[:X+Y]))
n = int(input())

lis = [1, 6, 36, 216, 1296, 7776, 46656,
     9, 81, 729, 6561, 59049]
m = len(c)

dp = [float('inf') for _ in range(n+1)]
dp[0] = 0

for j in range(1,n+1):
    temp = []
    for i in range(m):
        if j < c[i]:
            continue
        else:
            temp.append(dp[j-lis[i]]+1)
    dp[j] = min(temp)

print(dp[n])


### FIXED CODE ###

n = int(input())

lis = [1, 6, 36, 216, 1296, 7776, 46656,
     9, 81, 729, 6561, 59049]
m = len(lis)

dp = [float('inf') for _ in range(n+1)]
dp[0] = 0

for j in range(1,n+1):
    temp = []
    for i in range(m):
        if j < lis[i]:
            continue
        else:
            temp.append(dp[j-lis[i]]+1)
    dp[j] = min(temp)

print(dp[n])
def contains3(n):
    while n > 0:
        if n % 10 == 3:
            return True
        else:
            n /= 10
    return Falses

x = int(input())
out = ""
for i in range(x):
    n = i + 1
    if n % 3 == 0 or contains3(n):
        out += (" %d" % n)
print(out)

### FIXED CODE ###

def contains3(n):
    x = n
    while x > 0:
        if x % 10 == 3:
            return True
        else:
            x //= 10
    return False

x = int(input())
out = ""
for i in range(x):
    n = i + 1
    if n % 3 == 0 or contains3(n):
        out += (" %d" % n)
print(out)
x,y = int(input().split())
print((x-1)*(y-1))

### FIXED CODE ###

x,y = map(int, input().split())
print((x-1)*(y-1))
def main():
    from itertools import accumulate
    N, K = (int(i) for i in input().split())
    A = [int(i) for i in input().split()]
    sumA = sum(A)

    def enum_divisors(n):
        # 約数列挙
        divs = []
        for i in range(1, n+1):
            if i*i > n:
                break
            if n % i == 0:
                divs.append(i)
                if n//i != i:
                    # i が平方数でない
                    divs.append(n//i)
        return divs

    divs = enum_divisors(sumA)
    divs.sort(reverse=True)

    for d in divs:
        diff_n = []
        for a in A:
            if a % d != 0:
                diff_n.append(a % d)
        diff_n.sort()
        diff_p = []
        for dn in diff_n:
            diff_p.append(d - dn)
        S_n = list(accumulate([0] + diff_n))
        S_p = list(accumulate([0] + diff_p))
        M = len(S_n) - 1
        if min(S_n[i] for i in range(1, M)
               if (S_n[i] - (S_p[M] - S_p[i])) == 0) <= K:
            print(d)
            return


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    N, K = (int(i) for i in input().split())
    A = [int(i) for i in input().split()]
    sumA = sum(A)

    def trial_division(n):
        divs = []
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divs.append(i)
                if i != n//i:
                    divs.append(n//i)
        return divs

    from itertools import accumulate
    divs = trial_division(sumA)
    ans = 0
    for d in divs:
        R = [a % d for a in A if a % d != 0]
        R.sort()
        S = [acc for acc in accumulate(R)]
        M = len(S)
        # print(d, R, S)
        if M == 0:
            ans = max(ans, d)
            continue
        for i in range(M-1):
            ne = S[i]
            po = d*(M-1-i) - (S[M-1] - S[i])
            if po == ne and po <= K:
                ans = max(ans, d)
    print(ans)


if __name__ == '__main__':
    main()
s = input()
n1 = int(s[:2])
n2 = int(s[2:])
if 1 <= n1 <= 12 and 1 <= n2 <= 12:
  print("AMBIGUOUS)
elif (n1 > 12 or n1 == 0) and 1 <= n2 <= 12:
  print("YYMM")
elif (n2 > 12 or n2 == 0) and 1 <= n1 <= 12:
  print("MMYY")
else:
  print("NA")

### FIXED CODE ###

s = input()
n1 = int(s[:2])
n2 = int(s[2:])
if 1 <= n1 <= 12 and 1 <= n2 <= 12:
  print("AMBIGUOUS")
elif (n1 > 12 or n1 == 0) and 1 <= n2 <= 12:
  print("YYMM")
elif (n2 > 12 or n2 == 0) and 1 <= n1 <= 12:
  print("MMYY")
else:
  print("NA")
n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z <= k:
    z = 2Z
  else:
    z = z+k
print(z)

### FIXED CODE ###

n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z < k:
    z = 2*z
  else:
    z = z+k
print(z)
import math
n,c,k=map(int,input().split())
t=[0]*n
s=0
a=0
for i in range(n):
	t[i]=int(input())
    if i>0 and a>0:
      if t[i]-t[i-1]<=k:
        s+=(a+n)//c
        a=(a+n)%c
      else:
      	s+=math.ceil((a+n)/c)
        a=0
print(s)

### FIXED CODE ###

n,c,k=map(int,input().split())
t=[0]*n
for i in range(n):
    t[i]=int(input())
t.sort()
s=0
lt=0
ln=0

if c==1:
    print(n)
    exit()
for i in range(n):

    if i==0:
       lt=i
       ln+=1

    else:
        if t[i]-t[lt]>k:
            s+=1
            lt=i
            ln=0

        ln+=1
        if ln==c:
            s+=1
            lt=i+1
            ln=0

        #print(i, s, lt, ln)


    
if ln>0:
    s+=1

print(s)
def count(n):
  ans = 0
  for i in range(1,n+1):
    if n % i == 0:
      ans += 1
  return ans

ans = 0
N = (int(i) for i in input().split())
for i in range(1,N+1):
  if count(i) == 8:
    ans += 1
print(ans)

    

### FIXED CODE ###

def count(n):
  ans = 0
  for i in range(1,n+1):
    if n % i == 0:
      ans += 1
  return ans

ans = 0
N = int(input())
for i in range(1,N + 1):
  if i % 2 == 0:
  	continue
  if count(i) == 8:
    ans += 1
print(ans)
a,b,c=map(int,input().split())
d=a<b<c?"Yes":"No"
print(d)

### FIXED CODE ###

a,b,c=map(int,input().split())
print(('No','Yes')[a<b<c])
import numpy as np
from math import factorial
MOD = 10**9 + 7

n = int(input())

dist = np.diff(list(map(int, input().split())))
L = np.cumsum(np.array([1 / x for x in range(1, n)]))
n_1 = factorial(n-1) 
 
print(int(np.sum(L * dist * n_1)) % MOD)

### FIXED CODE ###

import numpy as np
from math import factorial
MOD = 10**9 + 7

n = int(input())

dist = np.diff(list(map(int, input().split())))
L = np.cumsum(np.array([1 / x for x in range(1, n)]))
n_1 = factorial(n-1) % MOD

# fac = [1] * n
# for i in range(1,n):
# 	fac[i] = fac[i-1] * i % MOD

# print(int(np.sum(L * dist * n_1)) % MOD)
# ans = 0
# for l, d in zip(L, dist):
#     print("l d ", l * d)
#     ans += l * d
#     ans %= MOD

ans = 0
tmp = 0
for i, d in enumerate(dist):
    tmp += pow(i+1, MOD-2, MOD)
    ans += tmp * d
    ans %= MOD

# print(n_1)
print(ans * n_1 % MOD)
# print(int(np.sum(dist * L * n_1) % MOD))
a, b = map(int, input().split())
print(sum(range(b-a)-a))

### FIXED CODE ###

a, b = map(int, input().split())
print(sum(range(b-a))-a)
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

x,y,a,b,c = mi()
p = li()
q = li()
r = li()

p.sort()
q.sort()
r.sort()


qp = True
qq = True
plef = a - x
qlef = b - y
ans = 0
rlen = len(r) -1
while True:
    if rlen <0:
        break
    if p[plef] >= q[qlef]:
        ima = q[qlef]
        tmp = "q"
    else:
        ima = p[plef]
        tmp = "p"
    if ima < r[rlen]:
        ans += r[rlen]
        rlen -= 1
        if tmp == "q":
            qlef += 1
        else:
            plef += 1
    
    else:
        break
    
for i in range(plef,a):
    ans += p[i]

for i in range(qlef,b):
    ans +=q[i]
print(ans)




### FIXED CODE ###

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

x,y,a,b,c = mi()
p = li()
q = li()
r = li()

p.sort()
q.sort()
r.sort()


qp = True
qq = True
plef = a - x
qlef = b - y
ans = 0
rlen = len(r) -1
while True:
    if rlen <0:
        break
    
    if plef == a:
        if qlef == b:
            break
        else :
            ima = q[qlef]
            tmp = "q"
    elif qlef == b:
        ima = p[plef]
        tmp = "p"
    elif p[plef] >= q[qlef]:
        ima = q[qlef]
        tmp = "q"
    else:
        ima = p[plef]
        tmp = "p"
    if ima < r[rlen]:
        ans += r[rlen]
        rlen -= 1
        if tmp == "q":
            qlef += 1
        else:
            plef += 1
    
    else:
        break
if plef != a:
    for i in range(plef,a):
        ans += p[i]
if qlef != b:
    for i in range(qlef,b):
        ans +=q[i]
print(ans)
s = input()
max_ = 0
pre = s[0]
ren = 1
for i in range(1, len(s)):
    if s[i] == pre:
        ren += 1
        max_ = max(max_, ren)
    else:
        ren = 1
        pre = s[i]
from collections import deque
status = deque([[1] * len(s)])
for i in range(max_):
    sta = [0] * len(s)
    if s[1] == 'L':
        sta[0] = status[i][1]
    else:
        sta[0] = 0
    if s[-2] == 'R':
        sta[-1] = status[i][-2]
    else:
        sta[-1] = 0
    a = [[1] * len(s)]
    for j in range(1, len(s) - 1):
        #print(sta)
        if s[j - 1] == 'R':
            sta[j] += status[i][j - 1]
        if s[j + 1] == 'L':
            sta[j] += status[i][j + 1]
    status.append(sta)
for i in range(1 + max_ - 2):
    status.popleft()
if (max_ - 2) % 2 == 0:
    print(' '.join([str(i) for i in status[1]]))
else:
    print(' '.join([str(i) for i in status[0]]))


### FIXED CODE ###

li = input()
n = len(li)
child_li = [0] * n

ruiseki = 0
for i in range(n - 1):
    if li[i] == 'R':
        ruiseki += 1
        if li[i + 1] == 'L':
            child_li[i + 1] = ruiseki // 2
            child_li[i] = (ruiseki + 1) // 2
    else:
        ruiseki = 0
        
ruiseki = 0
for i in range(n - 1, 0, -1):
    if li[i] == 'L':
        ruiseki += 1
        if li[i - 1] == 'R':
            child_li[i - 1] += ruiseki // 2
            child_li[i] += (ruiseki + 1) // 2
    else:
        ruiseki = 0
print(*child_li)
N, K = map(int,input().split())
A = list(map(int,input().split()))

for i in range(K+1, N+1):
    print('Yes') if A[i - K] < A[i] else print('No')

### FIXED CODE ###

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

for i in range(N-K):
    if A[K+i] <= A[i]:
        print('No')
    else:
        print('Yes')
k = int(input())
x=int(input())
k=k*500
if k<x:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

K, X = [int(i) for i in input().split()]
print("Yes" if 500*K>=X else "No")
n = int(input())
s = input()
k = int(input())
t = list(s)
u = ""
for i in range(s):
    if t[i]!=t[k-1]:
        t[i]="*"
for j in range(n):
    u = t[j]+u
print(u)

### FIXED CODE ###

a,b,c = map(int, input().split())
if min(a,b)<c and max(a,b)>c:
    print("Yes")
else:
    print("No")
import sys

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

if k==0:
    print(max(a))
    sys.exit()

def rf(mm):
    icnt=0
    for i in range(n):
        icnt+=(a[i]-1)//mm+1
    return icnt

asum=sum(a)
m=asum//(n+k)
um=asum
lm=1
for ii in range(60):
#    print(ii,um,lm,m)
    if rf(m)>(n+k):
        lm=m
        m=(um+lm)//2
    elif rf(m)<(n+k):
        um=m
        m=(lm+um)//2
    else:
        um=m-1
        m=(lm+um)//2
    if rf(m)==(n+k) and um-lm<5:
        break

for mi in range(m+5,m-10,-1):
#    print("mi",mi)
    if rf(mi)==(n+k) and rf(mi-1)>(n+k):
        break

print(mi)



### FIXED CODE ###

import sys

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

if k==0:
    print(max(a))
    sys.exit()

def rf(mm):
    if mm==0:
        mm=1
    icnt=0
    for i in range(n):
        icnt+=(a[i]-1)//mm+1
    return icnt

asum=sum(a)
m=asum//(n+k)
um=asum
lm=1
for ii in range(60):
    if m==1:
        break
    if rf(m)<=(n+k) and rf(m-1)>(n+k):
        break
    if um-lm<5:
        break
    if rf(m)>(n+k):
        lm=m
        m=(um+lm)//2-1
    elif rf(m)<(n+k):
        um=m
        m=(um+lm)//2-1
    else:
        um=m-1
        m=(um+lm)//2-1
#    if rf(m)==(n+k) and um-lm<5:

if um<1:
    print(1)
    sys.exit()
    
for mi in range(um,max(0,lm-1),-1):
    if rf(mi)<=(n+k) and rf(mi-1)>(n+k):
        break

print(mi)
s=input()
con=[0]*2
for i in range(4):
    if s[i]=='+':
        c[0]+=1
     else:
         c[1]+=1
print(c[0]-c[1])           

### FIXED CODE ###

s=input()
con=[0]*2
for i in range(4):
    if s[i]=='+':
        con[0]+=1
    else:
        con[1]+=1
print(con[0]-con[1])
from scipy.special import comb

N, K = map(int, input().split())

def f2(n, k):
    return int(comb(n+k-1, k - 1))

def f(n, k):
    if n < k:
        return 0
    if k < 1:
        return 0
    if n == 0 and k== 0:
        return 0
    return f2(n-k, k)



for i in range(1, K + 1):
    blue = f(K, i)
    red = 0
    red += f(N - K, i - 1)
    red += f(N - K, i)
    red += f(N - K, i)
    red += f(N - K, i+1)

    ans = blue * red
    print(ans)


### FIXED CODE ###

import math


N, K = map(int, input().split())
MOD = 10 ** 9 + 7

def comb(n, k):
    return math.factorial(n) // math.factorial(k) // math.factorial(n - k)

for i in range(1, K + 1):
    if i > N-K+1:
        print(0)
        continue
    blue = comb(N-K+1, i) % MOD
    red = comb(K-1, i-1) % MOD

    ans = blue * red % MOD
    print(ans)
S = input()
if S[0::2].count("L") + S[1::2].count("R") == 0: print("Yes")
  else: print("No")



### FIXED CODE ###

S = input()
if S[0::2].count("L") + S[1::2].count("R") == 0: print("Yes")
else: print("No")
n,m = map(int,input().split())
memo = [{} for _ in range(n+30)]
MOD = 10 ** 9 + 7

def combo(p,q):
    if p == 0:
        return 1
    elif q == 0 or q == p:
        return 1
    elif q in memo[p]:
        return memo[p][q]
    else:
        ret = (combo(p-1,q-1) + combo(p-1,q)) % MOD
        memo[p][q] = ret
        return ret

#print(combo(2,1))


fac = [0] * (m+1)
mm = m
for i in range(2,m+1):
    while mm % i == 0:
        mm = mm // i
        fac[i] += 1
        #print(mm,fac)

count = 1

for i in range(2,m+1):
    if fac[i] >= 1:
        count = (count * combo(fac[i]+n-1,fac[i])) % MOD
    #print(count)
    
print(count)

### FIXED CODE ###

n,m = map(int,input().split())
mod = 10 ** 9 + 7

def combo(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    else:
        r = min(r, n-r)
        return g1[n] * g2[r] * g2[n-r] % mod



N = n + 100
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

#print(combo(2,1))

#print(m)
fac = {}
mm = m
#print(mm)
count = 0
while mm % 2 == 0:
    count += 1
    mm //= 2
if count > 0:
    fac[2] = count
f = 3
count = 0
while f ** 2 <= mm:
    while mm % f == 0:
        count += 1
        mm //= f
        #print(f,count)
    if count > 0:
        fac[f] = count
        count = 0
    f += 2
    #print(fac)
if mm != 1:
    if mm in fac:
        fac[mm] += 1
    else:
        fac[mm] = 1
#print(fac)

count = 1

for i in fac:
    if fac[i] >= 1:
        count = (count * combo(fac[i]+n-1,fac[i],mod)) % mod
    #print(count)
    
print(count)
N = int(input())
S = list(map(int,input().split()))
print(len(set(S)))

### FIXED CODE ###

N = int(input())
S = list(map(str,input().split()))
print('Three') if len(set(S)) == 3 else print('Four')
input()
ls = list(map(int,input().split()))
for i in set(ls):
    while True:
        if ls.count(i) == 0 or ls.count(i) == i:
            break
        ls.remove(i)
        n += 1
print(n)


### FIXED CODE ###

from collections import Counter
input()
a = map(int,input().split())

result = 0
for k, v in Counter(a).items():
    if k > v:
        result += v
    elif k < v:
        result += v-k
print(result)