Harryxun/stf_run huggingface dataset:
S_input = str(input())
add_str_taple = ("dream", "dreamer", "erase", "eraser")

def recur_add(T):
    if T == S_input:
        print("YES")
        exit()
    else:
        if S_input.startswith(T):
            for word in add_str_taple:
                recur_add(T+word)
        else:
            return

recur_add("")
print("NO")

### FIXED CODE ###

import re
print("YES" if re.match("^(dream|dreamer|erase|eraser)+$", input()) else "NO")
x,y=map(int,input().split())

if (x+y)%3!=0: print(0)
else:
    n,m=y//3,y//3
    p = 10 ** 9 + 7
    N = 10 ** 6  # N は必要分だけ用意する
    fact = [1, 1]  # fact[n] = (n! mod p)
    factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
    inv = [0, 1]  # factinv 計算用
    for i in range(2, N+1):
        fact.append((fact[-1] * i) % p)
        inv.append((-inv[p % i] * (p // i)) % p)
        factinv.append((factinv[-1] * inv[-1]) % p)
    print(cmb(n+m,n,mod))

### FIXED CODE ###

def cmb(n, r, p):
    if r<0 or n<r:
        return 0
    r=min(r, n-r)
    return fact[n]*factinv[r]*factinv[n-r]%p

mod=10**9+7
MAXN=2*10**6+10
fact=[1, 1]
factinv=[1, 1]
inv=[0, 1]

for i in range(2, MAXN+1):
    fact.append((fact[-1]*i)%mod)
    inv.append(-inv[mod%i]*(mod//i)%mod)
    factinv.append((factinv[-1]*inv[-1])%mod)

x,y=map(int, input().split())
res=0
if (x+y)%3==0:
    m=(2*x-y)//3
    n=(2*y-x)//3
    res=cmb(m+n,m,mod)
print(res)
n = int(inpuit())
print((n // 2) / n)

### FIXED CODE ###

n = int(input())
print(((n + 1) // 2) / n)
n,x,m=map(int,input().split())
a=list()
ans=0
for i in range(n):
    ans+=x
    a.append(x)
    x=(x**2)%m
    if x in a:
        s=a.index(x)
        break

sum=0
for i in range(s, len(a)):
    sum+=a[i]

ans+=sum*(((n-s)//(len(a)-s))-1)

z=(n-s)%(len(a)-s)
for i in range(z):
    ans+=a[s]
    s+=1
print(ans)


### FIXED CODE ###

n,x,m=map(int,input().split())
a=list()
ans=0
s=n
for i in range(n):
    ans+=x
    a.append(x)
    x=(x**2)%m
    if x in a:
        s=a.index(x)
        break

sum=0
if s!=n:
    for i in range(s, len(a)):
        sum+=a[i]   

if len(a)>s:
    ans+=sum*(((n-s)//(len(a)-s))-1)

    z=(n-s)%(len(a)-s)
    if z!=0:
        for i in range(z):
            ans+=a[s+i]
print(ans)
li = input().split()

if li[1] == "+":
  print(int(li[0]+li[2]))
else:
  print(int(li[0]-li[2]))
  


### FIXED CODE ###

li = input().split()
 
if li[1] == "+":
  print(int(li[0])+int(li[2]))
else:
  print(int(li[0])-int(li[2]))
x, y = input("Number")
print(x*y)

### FIXED CODE ###

a,b = map(int,input(). split ())
print(a*b)
a, b = map(int,input().split())
ans = a*b
print(int(ans))

### FIXED CODE ###

a,b = input().split()
a = int(a)
b2 = 0
for i in b:
	if i == '.': continue
	else:
		b2 = 10*b2+int(i)
print((a*b2)//100)
n = int(input())
if n % 615 == 0:
	print(1)
else:
	if n%100 == 0 or n%101==0 or n%102 == 0 or n%103==0 or n%104==0 or n%105==0:
		print(1)
	elif n%209==0 or n%206==0 or n%207==0 or n%208==0 or n%201 ==0 or n%202 == 0 or n%203==0 or n%204 == 0 or n%205 == 0:
		print(1)
	else:
		print(0)

### FIXED CODE ###

#ossan
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if d2 == 1:
	print(1)
else:
	print(0)
N = int(input())
H_list = input().split(" ")
H_LIST = []

for i in range(0, N):
    H_LIST.append(int(H_list[i]))
 
max_count = 0

for i in range(0, N):
    S = H_LIST[i]
    count = 0
    for j in range(i + 1, N):
        if S >= H_LIST[j]:
            S = H_LIST[j]
            count += 1
        else:
            pass
    if max_count < count:
        max_count = count

print(max_count)


### FIXED CODE ###

S_list = input()
T_list = input()
count = 0

for i in range(0, 3):
  if S_list[i] == T_list[i]:
    count += 1
  else:
    pass
  
print(count)
# -*- coding: utf-8

while True:
   if map(int,raw_input().split()) == [0,0]:
      break

   a = map(int,raw_input().split())
   for i in range(a[0]):
      print('#'*a[1])
      print('\n')



### FIXED CODE ###

# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')
import math
n,m = map(int,input().split())
before = -1
alls = 1
for i in range(m):
        a = int(input())
        b = (a - before - 2) // 2
        c = a - before - 2
        ptr = 0
        for j in range(b + 1):
                ptr += math.factorial(c - j) / (math.factorial(j) * math.factorial(c - 2 * j))
        alls = alls * ptr
        before = a
ptr = 0
b = (n - a - 1) // 2
c = n - a - 1
for j in range(b + 1):
        ptr += math.factorial(c - j) / (math.factorial(j) * math.factorial(c - 2 * j))
alls = alls * ptr
print(int(alls % 1000000007))

### FIXED CODE ###

n,m = map(int,input().split())
stair = [0,1] + [0 for i in range(n)]
ba = 2
for i in range(m):
	a = int(input()) + 1
	for j in range(ba,a):
		stair[j] = stair[j - 1] + stair[j - 2]
	ba = a + 1
for i in range(ba,n + 2):
	stair[i] = stair[i - 1] + stair[i - 2]
print(stair[n + 1] % 1000000007)
import math
a, b = map(int, input().split())
ans = (a*b)/math.gcd(a, b)
print(int(ans))

### FIXED CODE ###

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

def lcm(a,b):
    return a*b//gcd(a,b)

a, b = map(int, input().split())
print(lcm(a, b))
N, x = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for i in range(N):
  if x < min(A):
    print(cnt)
    break
  elif i == N-1 and A[i]-x > 0:
    print(N-1)
  elif i == N-1 and A[i]-x == 0:
    print(N)
  else:
    x -= min(A)
    A.remove(min(A))
    cnt += 1

### FIXED CODE ###

N, x = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for i in range(N):
  if x < min(A):
    print(cnt)
    break
  elif i == N-1 and x-A[0] > 0:
    print(N-1)
    break
  elif i == N-1 and x-A[0] == 0:
    print(N)
    break
  else:
    x -= min(A)
    A.remove(min(A))
    cnt += 1
import itertools

D,G = map(int, input().split())
PC = [list(map(int, input().split())) for _ in range(D)]

P_list = list(range(D))
cnt = float('inf')

for i in range(D):
	for bonus in itertools.combinations(P_list, i):

		tmp_cnt = 0
		score = 0

		for j in bonus:
			score += PC[j][0] * 100 * (j+1) + PC[j][1]
			tmp_cnt += PC[j][0]

		res_max_p = max([k for k in range(D) if k not in bonus])
		res_score = G - score
		if res_score > 0:
			t = (-res_score//((res_max_p+1)*100)) * (-1) 
			if t < PC[res_max_p][0]:
				tmp_cnt += t
			else:
				continue

		cnt = min(cnt, tmp_cnt)

if cnt == float('inf'):
	cnt = sum([PC[j][0] for j in rnage(D)])

print(cnt)




### FIXED CODE ###

D, G = map(int, input().split())

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

p = []
c = []
for _ in range(D):
	p_tmp, c_tmp = map(int,input().split())
	p.append(p_tmp)
	c.append(c_tmp)
t = [(i+1)*100*p[i] + c[i] for i in range(D)]

ans = float("inf")

for i in range(2**D):
	flg = list(map(int, Base_10_to_n(i,2).rjust(D,"0")))
	tmp_score = sum([t[j] for j in range(D) if flg[j] == 1])
	cnt = sum([p[j] for j in range(D) if flg[j] == 1])

	if tmp_score < G:

		rst_max_q = max([j for j in range(D) if flg[j] == 0])

		rst_q_num = 0
		while rst_q_num < p[rst_max_q]:
			tmp_score += 100*(rst_max_q+1)
			rst_q_num += 1
			cnt += 1
			if tmp_score >= G:
				break

		if tmp_score < G:
			continue

	ans = min(ans, cnt)


print(ans)
# get the date as a string
s = raw_input()

WEEKDAYS=['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
integer_day = WEEKDAYS[::-1].indexof(s) + 1
print(integer_day)

### FIXED CODE ###

# get the date as a string
s = input()

WEEKDAYS=['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
integer_day = WEEKDAYS[::-1].index(s) + 1
print(integer_day)
def resolve():
    a, b = list(map(int, input().split()))
    l = list(range(a, b + 1))

    if a <= 0 and b >= 0:
        print('Zero')
    elif a > 0:
        print('Positive')
    else:
        if (b - a) % 2 == 0:
            print('Negative')
        else:
            print('Positive')
    return


resolve()

### FIXED CODE ###

def resolve():
    a, b = list(map(int, input().split()))

    if a <= 0 and b >= 0:
        print('Zero')
    elif b < 0 and (b - a + 1) % 2 == 1:
        print('Negative')
    else:
        print('Positive')
    return


resolve()
N=int(input())
MAXN=N+5
MAXV=N*(N-1)//2

a=[[0 for j in range(N-1)] for i in range(N)]
for i in range(N):
  line=list(map(int,input().split()))
  for j in range(N-1):
    a[i][j]=line[j]-1

id=[[0 for j in range(MAXN)] for i in range(MAXN)]
v=0
for i in range(N-1):
  for j in range(i+1,N):
    id[i][j]=v
    v+=1

def toId(i,j):
  if i>j:
    i,j=j,i
  return id[i][j]

to=[[] for i in range(MAXV)]
for i in range(N):
  for j in range(N-1):
    a[i][j]=toId(i,a[i][j])
  for j in range(N-2):
    to[a[i][j+1]].append(a[i][j])
    
visited=[False for i in range(MAXV)]
calculated=[False for i in range(MAXV)]
dp=[0 for i in range(MAXV)]

def dfs(v):
  if visited[v]:
    if not calculated[v]:
      return -1
    return dp[v]
  visited[v]=True
  for u in to[v]:
    val=dfs(u)
    if val==-1:
      return -1
    if val+1>dp[v]:
      dp[v]=val+1
  calculated[v]=True
  return dp[v]
    
ans=0
for i in range(v):
  res=dfs(i)
  if res==-1:
    print(-1)
    break
  if ans<res:
    ans=res
else:
  print(ans+1)

### FIXED CODE ###

N=int(input())
a=[[0 for j in range(N-1)] for i in range(N)]
for i in range(N):
  line=list(map(int,input().split()))
  for j in range(N-1):
    a[i][j]=line[j]-1
  a[i]=a[i][::-1]
    
q=[]

#seen=[[False for j in range(N)] for i in range(N)]

# 選手nが試合できるならqueに入れる
def check(i):
  if len(a[i])==0:
    return False
  j=a[i][-1]
  if a[j][-1]==i:
    q.append([i,j])
  
for i in range(N):
  check(i)
  
from collections import defaultdict

day=0
while q:
  day+=1
 # q=sorted(q)
  prevQ=q.copy()
  q=[]
  matched=defaultdict(list)
  for p in prevQ:
    i=p[0]
    j=p[1]
    if i>j:
      i,j=j,i
    if matched[i]:
      continue
    a[i].pop()
    a[j].pop()
    check(i)
    check(j)
    matched[i].append(j)
    
for i in range(N):
  if len(a[i])!=0:
    print(-1)
    break
else:
  print(day)
K=int(input())

p=1
dp,old=[[1]*10],[0,1]
n=9
while K>n:
  old=dp[p-1]
  tmp=[0]*10
  for i in range(1,9):
    tmp[i]=old[i-1]+old[i]+old[i+1]
  tmp[9]=old[8]+old[9]
  tmp[0]=old[0]+old[1]
  dp.append(tmp)
  p+=1
  n+=sum(tmp[1:])

ans=0
n-=sum(tmp[1:])
K-=n
c=2
for i in range(p-1,-1,-1):
  if c!=0:
    c-=1
  while K>dp[i][c]:
    K-=dp[i][c]
    c+=1
  ans+=c*10**i
print(ans)

### FIXED CODE ###

K=int(input())

if K<=9:
  print(K)
else:
  p=1
  dp,old=[[1]*10],[0,1]
  n=9
  while K>n:
    old=dp[p-1]
    tmp=[0]*10
    for i in range(1,9):
      tmp[i]=old[i-1]+old[i]+old[i+1]
    tmp[9]=old[8]+old[9]
    tmp[0]=old[0]+old[1]
    dp.append(tmp)
    p+=1
    n+=sum(tmp[1:])

  ans=0
  n-=sum(tmp[1:])
  K-=n
  c=2
  for i in range(p-1,-1,-1):
    if c!=0:
      c-=1
    while K>dp[i][c]:
      K-=dp[i][c]
      c+=1
    ans+=c*10**i
  print(ans)
a, b = input().split()
a = int(a)
b = int(b)

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

### FIXED CODE ###

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

if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

x = int(input())
print(a[x-1]

### FIXED CODE ###

a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

x = int(input())
print(a[x-1])
a,b = map(input().split())
 
print(a*b, 2*(a+b))

### FIXED CODE ###

a,b = list(map(int, input().split()))
c = 2 * (a+ b)
d = a * b

print(str(d) + " " + str(c))
import numpy as np
#b.py

n=int(input())
a=[int(i) for i in input().split()]
a = np.array(a)
result=1
for i in range(n):
	#a = map(int,input().split())
	result *= a[i]
if result > 1000000000000000000:
	print(-1)
else:
	print(result)

### FIXED CODE ###

import sys
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
LIMIT = 10 ** 18
n=int(input())
#a=(int,read.split())
a=[int(i) for i in input().split()]
if 0 in a:
	print(0)
	exit()

ans = 1
for i in a:
	ans *= i
	if ans > LIMIT:
		print(-1)
		exit()
print(ans)
a,b,c = map(int, input().split())
d,e,f = abs(b-a),abs(c-b),abs(a-c)
ans = 0
if d == e and e == f:
  print(-1)
else:
  while d % 2 == 0 and e % 2 == 0 f % 2 == 0:
    ans += 1
    d //= 2
    e //= 2
    f //= 2
  print(ans)

### FIXED CODE ###

a,b,c = map(int, input().split())
d,e,f = abs(b-a),abs(c-b),abs(a-c)
ans = 0
if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
  print(0)
else: 
  if d == e and e == f:
    print(-1)
  else:
    while d % 2 == 0 and e % 2 == 0 and f % 2 == 0:
      ans += 1
      d //= 2
      e //= 2
      f //= 2
    print(ans)
def search(v, A, B, flg, p, c, s):
#  if c > 2:
#    print("v=", v, "flg=", flg, "p=", p, "cnt=", c)
  if flg[v-1] == 1:
    return c
  flg[v-1] = 1
  p.append(v)
  c += 1
  for idx in range(len(A)):
    if v == A[idx]:
      cnt = search(B[idx], A, B, flg, p, c, s)
      if cnt != 0:
        return cnt
      else:
        flg[idx] = 0
        return 0
  for idx in range(len(B)):
    if v == B[idx]:
      cnt = search(A[idx], A, B, flg, p, c, s)
      if cnt != 0:
        return cnt
      else:
        flg[idx] = 0
        return 0
  return c

#
# Main Routine
#
str = input()
NM = list(map(int,str.split()))
#print(NM)
ANS = 1
AB = []
C = []
A = []
B = []
for i in range(0,int(NM[1])):
  str = input()
  AB.append(list(map(int,str.split())))
  A.append(AB[i][0])
  B.append(AB[i][1])
#  print("A=", A, "B=", B)
#
# Start path finding
#
for i in range(0,int(NM[1])):  # Choose start vertex
  flg = [] # Clear the flag list
  for j in range(0,int(NM[0])):
    flg.append(0)
  v = AB[i][0]  # current vertex
  s = v   # start vertex
  p = []
  cnt = search(v, A, B, flg, p, 0, s)
  for idx in range(len(A)):
    if s == A[idx] and B[idx] == 1:
      cnt = 0	# Start vertex doesn't satisfy the condition.
  for idx in range(len(B)):
    if s == B[idx] and A[idx] == 1:
      cnt = 0	# Start vertex doesn't satisfy the condition.
  if cnt != 0:
    print(cnt)	# If all the conditions are met, output the result and stop.
#    print(p)
    for i in p:
      print(i)
    break

### FIXED CODE ###

N = input()
state = 0
max = 0
min = 0
prev = 0
len = 0
ANS = 1
S = input()
A = list(map(int,S.split()))
 
for i in range(0,int(N)):
  len = len + 1
  if state in {0}:	# Initial state
      prev = A[i]
      state = 1
  elif state in {1}: # Newtral state
    if A[i] > prev:
      state = 2
    elif A[i] < prev:
      state = 3
  elif state in {2}: # Acsending state
    if A[i] < prev:
      state = 1
      ANS = ANS + 1
      len = 0
  elif state in {3}: # Descending state
    if A[i] > prev:
      state = 1
      ANS = ANS + 1
      len = 0
  prev = A[i]
#  print('s=', state, 'in=', A[i], 'prev=', prev, 'ANS=', ANS, 'len=', len)
print(ANS)
n, m = map(int, input().split())
a = list(map(int, input().split()))

heapq.heapify(a) # in-place

for _ in range(m):
    b, c = map(int, input().split())
    for _ in range(b):
        temp = heapq.heappop(a)
        if c > temp:
            heapq.heappush(a, c)
        else:
            heapq.heappush(a, temp)
            break

print(sum(a))

### FIXED CODE ###

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

bc = []

for _ in range(m):
    b, c = map(int, input().split())
    bc.append((b, c))

bc = sorted(bc, key=lambda x: x[1], reverse=True)

cnt = 0

for b, c in bc:
    cnt += b
    a += [c] * b
    if cnt >= n:
        break

print(sum(sorted(a,reverse=True)[:n]))
N = int(input())

task = [0] * (10 ** 9 + 1)
M = 0
for _ in range(N):
    a, b = map(int, input().split())
    task[b] += a
    if b > M:
        M = b

t = 0
ans = 'Yes'
for i in range(M+1):
    t += task[i]
    if t > i:
        ans = 'No'
        break

print(ans)





### FIXED CODE ###

N = int(input())

task = []
M = 0
for _ in range(N):
    a, b = map(int, input().split())
    task.append((b, a))

task.sort()

s = 0
ans = 'Yes'
for a, b in task:
    s += b
    if s > a:
        ans = 'No'
        break
print(ans)
a, b, c=map(int, input().split())
if a==b:
  print(c)
elif b=c:
  print(a)
else:
  print(b)

### FIXED CODE ###

a, b, c=map(int, input().split())
if a==b:
  print(c)
elif b==c:
  print(a)
else:
  print(b)
n,m=map(int,input())
a,b,c,d=[],[],[],[]
for i in range(n):
  o = list(map(int, input().split()))
  a.append(o[0])
  b.append(o[1])
for i in range(m):
  o = list(map(int, input().split()))
  c.append(o[0])
  d.append(o[1])
s = []
for i in range(n):
  g = float('inf')
  h = 0
  for j in range(m):
    if g > abs(a[i]-c[j])+abs(b[i]-d[j]):
      g = abs(a[i]-c[j])+abs(b[i]-d[j])
      h = j+1
  s.append(h)
for i in s:
  print(i)

### FIXED CODE ###

n,m=map(int,input().split())
a,b,c,d=[],[],[],[]
for i in range(n):
    o = list(map(int, input().split()))
    a.append(o[0])
    b.append(o[1])
for i in range(m):
    o = list(map(int, input().split()))
    c.append(o[0])
    d.append(o[1])
s = []
for i in range(n):
    g = float('inf')
    h = 0
    for j in range(m):
        if g > abs(a[i]-c[j])+abs(b[i]-d[j]):
            g = abs(a[i]-c[j])+abs(b[i]-d[j])
            h = j+1
    s.append(h)
for i in s:
    print(i)
fun main(args:Array<String>){
    val a=readLine()!!.split(" ").map{it.toInt()}
    if (a[0]+a[1]+a[2]>=22){
        println("bust")
    }else{
        println("win")
    }
}

### FIXED CODE ###

A,B,C=tuple(map(int,input().split()))
print("bust" if A+B+C>=22 else "win")
s = str(input())
if s[0] == "0" and s[1] == "0" and int(s[2]+s[3]) > 12:
    print("NA")
elif s[2] == "0" and s[3] == "0" and int(s[0]+s[1]) > 12:
    print("NA")
elif s = "0000":
    print("NA")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) > 12:
    print("NA")
elif s[0] == "0" and s[1] == "0":
    print("YYMM")
elif s[2] == "0" and s[3] == "0":
    print("MMYY")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) <= 12:
    print("YYMM")
elif int(s[2]+s[3]) > 12 and int(s[0]+s[1]) <= 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

### FIXED CODE ###

s = str(input())
if s[0] == "0" and s[1] == "0" and int(s[2]+s[3]) > 12:
    print("NA")
elif s[2] == "0" and s[3] == "0" and int(s[0]+s[1]) > 12:
    print("NA")
elif s == "0000":
    print("NA")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) > 12:
    print("NA")
elif s[0] == "0" and s[1] == "0":
    print("YYMM")
elif s[2] == "0" and s[3] == "0":
    print("MMYY")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) <= 12:
    print("YYMM")
elif int(s[2]+s[3]) > 12 and int(s[0]+s[1]) <= 12:
    print("MMYY")
else:
    print("AMBIGUOUS")
s=list(input())
t=list(input())
flag=False
cnt=0
if sorted(s)==sorted(t):
  a=s.index(t[0])
  for i in range(len(s)):
    b=i+a
    print(b)
    if b>=len(s):
      b-=len(s)
    if s[b]==t[i]:
      cnt+=1

if cnt==len(S):
  flag=True
print('Yes' if flag else 'No')

### FIXED CODE ###

s=list(input())
t=list(input())
flag=False
cnt=0
if sorted(s)==sorted(t):
  a=s.index(t[0])
  for i in range(len(s)):
    b=i+a
    if b>=len(s):
      b-=len(s)
    if s[b]==t[i]:
      cnt+=1

if cnt==len(s):
  flag=True
print('Yes' if flag else 'No')
s = map(int,input())
a = map(str,input())
if s >= 3200
 print("red")
else
 print(s)

### FIXED CODE ###

a = int(input())
s = str(input())
if a >= 3200:
 print(s)
if a < 3200:
 print("red")
A,B,T=map(int,input().split())
t=T+0.5
count=0

for i in range(1,t):
    if A*i<=t:
        count+=B    
    
print(count)

### FIXED CODE ###

A,B,T=map(int,input().split())
t=T+0.5
t=int(t)
a=int(t/A)
print(a*B)
import sys
sys.setrecursionlimit(10 ** 9)

n = int(input())
x = input()

p = [-1 for _ in range(2*(10**5)+10)]
cnt = x.count('1')

def calc(a):
  #print('a=',a)
  if p[a] != -1:
    return p[a]
  else:
    if a == 0:
      ret = 0
    else:
      b = bin(a).count('1')
      ret = 1+calc(a%b)
    p[a] = ret
    return ret

x0 = int(x,2)%(cnt-1)
x1 = int(x,2)%(cnt+1)
for i in range(n):
  y = list(x)
  if y[i] == '0':
    xx = pow(2,n-i-1,cnt+1)
    print(calc((x1+xx)%(cnt+1))+1)
  else:
    xx = pow(2,n-i-1,cnt-1)
    print(calc((x0-xx)%(cnt-1))+1)
  

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)

n = int(input())
x = input()

p = [-1 for _ in range(2*(10**7)+1)]
cnt = x.count('1')

def calc(a):
  #print('a=',a)
  if 0 <= a <= 2*(10**7) and  p[a] != -1:
    return p[a]
  else:
    if a == 0:
      ret = 0
    else:
      b = bin(a).count('1')
      ret = 1+calc(a%b)
    if 0 <= a <= 2*(10**7):
      p[a] = ret
    return ret

if cnt > 1:
  x0 = int(x,2)%(cnt-1)
  xx0 = [1]
  for i in range(n+1):
    xx0.append((xx0[-1]*2)%(cnt-1))
x1 = int(x,2)%(cnt+1)
xx1 = [1]
for i in range(n+1):
  xx1.append((xx1[-1]*2)%(cnt+1))

y = list(x)  
for i in range(n):
  if y[i] == '0':
    xx = xx1[n-i-1]
    print(calc((x1+xx)%(cnt+1))+1)
  else:
    if cnt == 1:
      print(0)
    else:
      xx = xx0[n-i-1]
      print(calc((x0-xx)%(cnt-1))+1)
N=input()
N**3

### FIXED CODE ###

print(int(input())**3)
H, W , N = map(int,input().split())
from bisect import bisect_left
from bisect import bisect_right
matrix = []
for _ in range(N):
    x,y = map(int,input().split())
    x -= 1
    y -= 1
    matrix.append([x,y])
matrix.sort()
ans = [0 for _ in range(10)]
cand = {}
for l in matrix:
    for x_r in [-2, -1 , 0]:
        for y_r in [-2, -1 , 0]:
            nowx = l[0] + x_r
            nowy = l[1] + y_r
            if nowx < 0 or nowy < 0 or nowx + 2>= H or nowy+ 2 >= W:
                continue
            #ここで起点(左上)nowx, nowy として　 9マスに着目する
            name = str(nowx) + str(nowy)
            try: cand[name] += 1
            except: cand[name] = 1
tmp = ((H - 2) * (W - 2))
for x in cand.values():
    if x == 9:
        while True:
            print(W)
    ans[x] += 1
    tmp -= 1
ans[0] = tmp
for x in ans:
    print(x)

    
    


### FIXED CODE ###

H, W , N = map(int,input().split())
from bisect import bisect_left
from bisect import bisect_right
matrix = []
for _ in range(N):
    x,y = map(int,input().split())
    x -= 1
    y -= 1
    matrix.append([x,y])
matrix.sort()
ans = [0 for _ in range(10)]
cand = {}
for l in matrix:
    for x_r in [-2, -1 , 0]:
        for y_r in [-2, -1 , 0]:
            nowx = l[0] + x_r
            nowy = l[1] + y_r
            if nowx < 0 or nowy < 0 or nowx + 2>= H or nowy+ 2 >= W:
                continue
            #ここで起点(左上)nowx, nowy として　 9マスに着目する
            name = str(nowx) +"hoge" +str(nowy)
            try: cand[name] += 1
            except: cand[name] = 1
tmp = ((H - 2) * (W - 2))
for x in cand.values():
    ans[x] += 1
    tmp -= 1
ans[0] = tmp
for x in ans:
    print(x)
if N > 1 and M > 1:
    four = 4
    six = (N - 2) * 2 + (M - 2) * 2
    nine = N * M - four - six
    print(nine)
else:
    two = 2
    three = N * M - two
    print(three)

### FIXED CODE ###

import sys

N, M = map(int, sys.stdin.readline().split())

if N == 1 and M == 1:
    print(1)
elif N == 1 or M == 1:
    two = 2
    three = N * M - two
    print(three)
else:
    four = 4
    six = (N - 2) * 2 + (M - 2) * 2
    nine = N * M - four - six
    print(nine)
n = int(input())
nums = list(map(int, input.split('')))
count = 0
count2 = count
for i in range(n-1):
  if nums[i] >= nums[i+1]:
    count += 1
  else:
    count2 = max([count, count2])
    count = 0
print(max([count, count2]))

### FIXED CODE ###

n=int(input())
h=[int(i) for i in input().split()]
c=0
d=c
for i in range(n-1):
    if h[i]>=h[i+1]:
        c+=1
    else:
        d=max([c,d])
        c=0

print(max([c,d]))
N=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
x,y=0.0
for i in range(N):
  if i%2==0:
    x+=i
  else:
    y+=i
print(x-y)

### FIXED CODE ###

N=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
x=0
y=0
for i in range(N):
  if i%2==0:
    x+=a[i]
  else:
    y+=a[i]
print(abs(x-y))