Harryxun/stf_run huggingface dataset:
H,W = map(int,input().split())
src = [input() for i in range(H)]

ans = []
for row in src:
    ans.append(list(row))

dxy = [(-1,-1),(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(-1,0)]
for y in range(H):
    for x in range(W):
        if src[y][x] == '#': continues
        c = 0
        for dx,dy in dxy:
            if x+dx <= 0 or x+dx >= W or y+dy <= 0 or y+dy >= H: continue
            if src[y+dy][x+dx] == '#': c += 1        
        ans[i][j] = c

for row in ans:
    print(''.join(list(map(str,row))))


### FIXED CODE ###

H,W = map(int,input().split())
src = [input() for i in range(H)]

ans = []
for row in src:
    ans.append(list(row))

for i in range(H):
    for j in range(W):
        if src[i][j] == '#': continue
        c = 0
        if i > 0:
            if j > 0 and src[i-1][j-1] == '#': c += 1
            if src[i-1][j] == '#': c += 1
            if j < W-1 and src[i-1][j+1] == '#': c += 1
        if j > 0 and src[i][j-1] == '#': c += 1
        if j < W-1 and src[i][j+1] == '#': c += 1
        if i < H-1:
            if j > 0 and src[i+1][j-1] == '#': c += 1
            if src[i+1][j] == '#': c += 1
            if j < W-1 and src[i+1][j+1] == '#': c += 1
        ans[i][j] = c

for row in ans:
    print(''.join(list(map(str,row))))
import itertools

def sign(num):
    if num < 0:
        return -1
    elif num > 0:
        return 1
    else:
        return 0

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

a_sum = [a_i[0]]
for i, a in enumerate(a_i[1:]):
    i += 1
    a_sum.append(a_sum[-1]+a)

signs = [0, 0]
changes = 0

for i, sum_i in enumerate(a_sum):
    if sum_i != 0:
        signs[i%2] = sign(sum_i)
        signs[i%2+1] = -sign(sum_i)
        break

if signs == [0, 0]:
    signs = [1, -1]

for i, sum_i in enumerate(a_sum):
    if i == 0:
        signs = [sign(sum_i), -sign(sum_i)]
    elif sign(sum_i) != signs[i%2]:
        a_sum[i:] = [num + (abs(sum_i) + 1) * signs[i%2] for num in a_sum[i:]]
        changes += abs(sum_i) + 1
    # print(a_sum)
print(changes)


### FIXED CODE ###

import itertools

def sign(num):
    if num < 0:
        return -1
    elif num > 0:
        return 1
    else:
        return 0

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

signs = [-1,1]
a_sum = 0
changes_1 = 0
for i, a in enumerate(a_i):
    a_sum += a
    if sign(a_sum) != signs[i%2]:
        changes_1 += abs(a_sum) + 1
        a_sum = signs[i%2]

signs = [1,-1]
a_sum = 0
changes_2 = 0
for i, a in enumerate(a_i):
    a_sum += a
    if sign(a_sum) != signs[i%2]:
        changes_2 += abs(a_sum) + 1
        a_sum = signs[i%2]

print(min(changes_1,changes_2))
n,m = map(int, input().split())
list = [0] * n
list[0] = 1
if n >= 2:
    list[1] = 2
if n >= 3:
    for i in range(2, n):
        list[i] = list[i - 2] + list[i - 1]



ans = 1
o = 0
for i in range(m):
    a = int(input())
    if a == o:
        ans = 0
        break
    if a > o + 1:
        ans = (ans * list[a - o - 2]) % 1000000007
    o = a + 1

if a + 1 < n:
    ans = (ans * list[n - a - 2]) % 1000000007
print(ans)

### FIXED CODE ###

n,m = map(int, input().split())
list = [0] * n
list[0] = 1
if n >= 2:
    list[1] = 2
if n >= 3:
    for i in range(2, n):
        list[i] = list[i - 2] + list[i - 1]

if m == 0:
    print(list[n - 1] % 1000000007)
else:
    ans = 1
    o = 0
    for i in range(m):
        a = int(input())
        if a == o:
            ans = 0
            break
        if a > o + 1:
            ans = (ans * list[a - o - 2]) % 1000000007
        o = a + 1

    if a + 1 < n:
        ans = (ans * list[n - a - 2]) % 1000000007
    print(ans)
import sys

sys.setrecursionlimit(100000)

N, M = map(int, input().split())
A = []

for _ in range(M):
    a = int(input())
    A.append(a)

d = {}


def f(x):
    # print(d)
    if x in A:
        return 0
    if x > N:
        return 0
    if x == N:
        return 1

    if d.get(x):
        return d[x]

    if d.get(x + 1):
        x1 = d.get(x + 1)
    else:
        x1 = f(x + 1)
        d[x + 1] = x1

    if d.get(x + 2):
        x2 = d.get(x + 2)
    else:
        x2 = f(x + 2)
        d[x + 2] = x2

    ans = x1 + x2
    # ans = f(x + 1) + f(x + 2)
    d[x] = ans
    return ans


print(f(0) % 1000000007)


### FIXED CODE ###

import sys

sys.setrecursionlimit(1000000)

N, M = map(int, input().split())
A = []
ANS = []
for i in range(N + 10):
    ANS.append(None)

for _ in range(M):
    a = int(input())
    A.append(a)
    ANS[a] = 0


def f(x):
    # print(ANS)
    # if x in A:
    #     print('::::', x)
    #     d[x] = 0
    #     return 0
    if ANS[x] is not None:
        return ANS[x]

    if x > N:
        return 0
    if x == N:
        return 1

    # if d.get(x + 1):
    #     x1 = d.get(x + 1)
    # else:
    #     x1 = f(x + 1)
    #     d[x + 1] = x1
    #
    # if d.get(x + 2):
    #     x2 = d.get(x + 2)
    # else:
    #     x2 = f(x + 2)
    #     d[x + 2] = x2

    # ans = x1 + x2
    ans = f(x + 1) + f(x + 2)
    ANS[x] = ans
    return ans


print(f(0) % 1000000007)
a, b, x = map(int, input().split())
np.arctan(a*b*b/2/x)*180/np.pi

### FIXED CODE ###

a, b, x = map(int, input().split())
import numpy as np
if b*a*a/2>x:
  print(np.arctan(a*b*b/2/x)*180/np.pi)
else:
  y=2*x/(a*a) - b
  z = b-y
  print(np.arctan(z/a)*180/np.pi)
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
nn = [a, b, c, d, e]
s = False
for i in nn:
    if s == False and i%10 != 0:
        chk = i%10
        last = i
        s = True
    elif s == False and i%10 == 0:
        pass
    elif s == True and i%10 != 0:
        if chk > i%10:
            chk = i%10
            last = i
#print(last)
s = False
for i in nn:
    if s == False and i == last:
        ans += i
        s = True
    else:
        if i%10 == 0:
            ans += i
        else:
            ans += i + (10 - i%10)
    #print(ans)
print(ans)

### FIXED CODE ###

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
nn = [a, b, c, d, e]
s = False
for i in nn:
    if s == False and i%10 != 0:
        chk = i%10
        last = i
        s = True
    elif s == False and i%10 == 0:
        pass
    elif s == True and i%10 != 0:
        if chk > i%10:
            chk = i%10
            last = i
if s == False:
    last = a
#print(last)
s = False
for i in nn:
    if s == False and i == last:
        ans += i
        s = True
    else:
        if i%10 == 0:
            ans += i
        else:
            ans += i + (10 - i%10)
    #print(ans)
print(ans)
enshu = int(input(R))
print(enshu * 2 *3.141592)



### FIXED CODE ###

enshu = int(input())
print(enshu * 2 *3.141592)
from collections import deque
s=deque(list(input()))
p=deque()
for i in range(len(s)):
    w=s.popleft()
    if w=="0":
        p.append("0")
    elif w=="1":
        p.append("1")
    else:
        p.pop()
for i in range(len(p)):
    print(p[i],end="")
        




### FIXED CODE ###

from collections import deque
s=deque(list(input()))
p=deque()
for i in range(len(s)):
    w=s.popleft()
    if w=="0":
        p.append("0")
    elif w=="1":
        p.append("1")
    else:
        if len(p)==0:
            continue
        else:
            p.pop()

for i in range(len(p)):
    print(p[i],end="")
n = int(input())
lst = [[-1 for _ in range(n)] for _ in range(n)]
for _ in range(n):
    c = int(input())
    for c1 in range(c):
        x, y = map(int, input().split())
        x -= 1
        lst[_][x] = y
        
ans = 0
for bit in range(2**n):
    flg = True
    for a in range(n):
        if (bit >> a) & 1:
            for x in range(n):
                if lst[a][x] != -1 and ((bit >> x) & 1) != lst[a][x]:
                	flg = False
                    break
    if flg:
        ans = max(ans, bin(bit).count('1'))
print(ans)


### FIXED CODE ###

a, b, c = map(int, input().split())
if a+b+c >= 22:
    print('bust')
else:
    print('win')
n,m = map(int,input().split())
print((1900*m+100(n-m))*2**m)


### FIXED CODE ###

n,m = map(int,input().split())
res = (1900*m+100*(n-m))*(2**m)
print(res)
from collections import deque
 
N, M = map(int, input().split())
 
vec = [[] for _ in range(N)]
for _ in range(M) :
    u, v = map(int, input().split())
    vec[u-1].append(v-1)
 
S, T = map(int, input().split())
S, T = S - 1, T - 1
 
visited = [[False] * N for _ in range(3)]
visited[0][S] = True
queue = deque([(S, 0)])
 
while queue :
    #print(queue)
    q, cost = queue.popleft()
    #print(q,cost)
    #print("vec[q] =",vec[q])
    p = (cost + 1) % 3
    for i in vec[q] :
        if p == 0 and i == T :
            
            print((cost + 1) // 3)
            exit()
        if not visited[p][i] :
            visited[p][i] = True
            #print(visited)
            #print(i)
            queue.append((i, cost + 1))
 
print(-1)

### FIXED CODE ###

a = str(input())
b=list(set(a))

if len(b) == 2:
  count = 0
  for i in range(1,4):
    if a[i] == a[0]:
      count +=1
  if count ==1:
    print("Yes")
  else:
    print("No")
else:
  print("No")
#!/usr/bin/python

n = int(input())

def fib(n):
    l = [0] * (n+1)
    l[0] = 1
    l[1] = 1

    for i in range(2, n+1):
        l[i] = l[i-1] + l[i-2]

    return l[i]

print(fib(n))

### FIXED CODE ###

#!/usr/bin/python

n = int(input())

def fib(n):
    l = list()
    l.append(1)
    l.append(1)

    for i in range(2, n+1):
        l.append(l[i-1] + l[i-2])

    return l[-1]

print(fib(n))
max=0
k=0
N=int(input())
for i in range(1,N+1):
    p=int(input())
    if p>max:max=p
    k=k+p
print((k-max)+(max//2))

### FIXED CODE ###

d=int(input())
print("Christmas"," Eve"*(25-d))
n,p = map(int, input().split())
i = 1
l = []
while i**n <= p:
    if p % i**n == 0:
        l.append(i)
    i += 1
print(max(l))

### FIXED CODE ###

from math import gcd
def prime_factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i,cnt])
    if temp != 1:
        arr.append([temp,1])
    if arr == []:
        arr.append([n,1])
    return arr
n,p = map(int,input().split())
l = prime_factorization(p)
ans = []
for i in l:
    if i[1] >= n:
        for j in range(i[1]//n):
            ans.append(i[0])
product = 1
for i in ans:
    product *= i
print(product)
# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]

# map info
visited = []
maps = []

# bfs algorithm
def bfs(h, w, cheese, sx, sy, moves):
    que = [(moves, sx, sy)]

    for i in range(h):
        for j in range(w):
            visited[i][j] = (maps[i][j] != 'X')

    visited[sy][sx] = False

    while len(que) > 0:
        c_moves, c_x, c_y = que.pop(0)
        if maps[c_y][c_x] == cheese:
            return (c_moves, c_x, c_y)

        for i in range(4):
            n_x = c_x + x_dir[i]
            n_y = c_y + y_dir[i]

            if(0 <= n_x < w and 0 <= n_y < h and visited[n_y][n_x]):
                que.append((c_moves+1, n_x, n_y))
                visited[n_y][n_x] = False

    return (-1, -1, -1)


# main function
if __name__ == '__main__':
    str = (input()).split()

    H = int(str[0])
    W = int(str[1])
    N = int(str[2])

    visited = [[True for i in range(W)] for j in range(H)]
    maps = ["" for i in range(H)]

    x, y = 0, 0
    for i in range(H):
        maps[i] = input()
        for j in range(W):
            if maps[i][j] == 'S':
                x, y = j, i

    moves = 0
    for i in range(1, N+1, 1):
        moves, x, y = bfs(H, W, str(i), x, y, moves)

    print(str(moves))

### FIXED CODE ###

# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]

# map info
visited = []
maps = []

# bfs algorithm
def bfs(h, w, cheese, sx, sy, moves):
    que = [(moves, sx, sy)]

    for i in range(h):
        for j in range(w):
            visited[i][j] = (maps[i][j] != 'X')

    visited[sy][sx] = False

    while len(que) > 0:
        c_moves, c_x, c_y = que.pop(0)
        if maps[c_y][c_x] == cheese:
            return (c_moves, c_x, c_y)

        for i in range(4):
            n_x = c_x + x_dir[i]
            n_y = c_y + y_dir[i]

            if(0 <= n_x < w and 0 <= n_y < h and visited[n_y][n_x]):
                que.append((c_moves+1, n_x, n_y))
                visited[n_y][n_x] = False

    return (-1, -1, -1)

# main function
if __name__ == '__main__':
    inputs = (input()).split()

    H = int(inputs[0])
    W = int(inputs[1])
    N = int(inputs[2])

    visited = [[True for i in range(W)] for j in range(H)]
    maps = ["" for i in range(H)]

    x, y = 0, 0
    for i in range(H):
        maps[i] = input()
        for j in range(W):
            if maps[i][j] == 'S':
                x, y = j, i

    moves = 0
    for i in range(1, N+1, 1):
        moves, x, y = bfs(H, W, str(i), x, y, moves)

    print(str(moves))
MOD = int(1e9+7)


def main():
    N = int(input())
    A = list(map(int, input().split()))
    cnt = [0] * 3
    ans = 1
    for a in A:
        ans = (ans * cnt.count(a)) % MOD
        c = cnt.index(a)
        cnt[c] += 1
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

MOD = int(1e9+7)


def main():
    N = int(input())
    A = list(map(int, input().split()))
    cnt = [0] * 3
    ans = 1
    for a in A:
        ans = (ans * cnt.count(a)) % MOD
        try:
            c = cnt.index(a)
        except ValueError:
            print(0)
            return
        cnt[c] += 1
    print(ans)


if __name__ == "__main__":
    main()
A,B,C=(int(i) for i in input().split())
if A*C<=B:
  print(C)
else:
  print(int(B/A)

### FIXED CODE ###

A,B,C=(int(i) for i in input().split())
if A*C<=B:
  print(C)
else:
  print(int(B/A))
import sys

if __name__ == "__main__":
    N = int(input())
    input_str = input()
    H_str = input_str.split(' ')
    H = []
    for str in H_str:
        H.append(int(str))

    for i in range(len(H) - 3):
        print(H)
        if H[i + 1] - H[i] > 1 and H[i + 2] - H[i + 1] < 0 and H[i + 3] - H[i + 2] < 0:
            print('No')
            sys.exit(0)

    print('Yes')

### FIXED CODE ###

N = int(input())
arr = list(map(int, input().split(' ')))

for i in range(N - 2, -1, -1):
    if arr[i] > arr[i + 1]:
        arr[i] -= 1
        if arr[i] > arr[i + 1]:
            print('No')
            break
else:
    print('Yes')
list1 = list(map(int, input().split()))
list2= []
list2[0] = list1[2]
list2[1] = list1[0]
list2[2] = list1[1]
print(list2)

### FIXED CODE ###

list1 = list(map(int, input().split()))
list2= []
list2.append(list1[2])
list2.append(list1[0])
list2.append(list1[1])
print(list2[0], list2[1], list2[2])
N , K = map(int,input().split())
B = {}
C = {}
D = {0}
A = list(map(int,input().split()))
place = 0
num = 0
C[0] = 0
while True:
    place = int(A[place]) - 1
    num += 1   
    if place in D:
        Y = int(num) - int(C[place])
        break
    else:
        B[num] = place
        C[place] = num
        D.add(place)
if Y == 0:
    print(1)
else:
    X = (K - num) % Y
    print(B[int(C[place]) + X] + 1)

### FIXED CODE ###

N , K = map(int,input().split())
B = {}
C = {}
D = {0}
A = list(map(int,input().split()))
place = 0
num = 0
C[0] = 0
while True:
    place = int(A[place]) - 1
    num += 1   
    if place in D:
        Y = int(num) - int(C[place])
        break
    elif num == K:
        break
    else:
        B[num] = place
        C[place] = num
        D.add(place)
try:
    X = (K - num) % Y
    print(B[C[place] + X] + 1)
except:
    print(place+1)
# coding: utf-8
# Your code here!
def func(lis):
    #print(lis)
    count=0
    while len(lis)>1 and lis[-1]!=lis[-2]:
        lis.pop(-1)
        count+=1
    
    loc=0
    l_count=0
    last=len(temp)-1
    count+=temp[0]*(temp[0]-1)//2+(temp[0]-1)*last
    pre=0
    for i in range(len(lis)-1):
        if lis[i]!=pre:
            loc+=i
            l_count+=1
            pre=lis[i]
    
    count+=l_count*last-loc
    
    return count+1

N=int(input())

pre=int(input())
if pre!=0:
    print(-1)
    exit()

temp=[]
ans=0
for _ in range(N-1):
    A=int(input())
    if A-pre>1:
        print(-1)
        exit()
    if A-pre<0:
        ans+=func(temp)
        temp=[]
        #print(ans)
    if A!=0:
        temp.append(A)
    pre=A
ans+=func(temp)

print(ans)
    


### FIXED CODE ###

# coding: utf-8
# Your code here!
N=int(input())

pre=int(input())
if pre!=0:
    print(-1)
    exit()

ans=0
count=0
for _ in range(N-1):
    A=int(input())
    if A-pre>1:
        print(-1)
        exit()
    if A==pre:
        count+=1
    else:
        ans+=pre*count
        if A<pre:
            ans+=(A-1)
        ans+=1
        count=0
        #print(_,ans)
    pre=A

print(ans+pre*count)
n = int(input())
a = list(map(int,input().split()))
suma = 0
sumb = 0
a.sort(reverse == True)
 
for i in range(len(a)):
  if a[i]%2 == 0:
    suma += a[i]
  else:
    sumb += a[i]
    
print(suma-sumb)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
suma = 0
sumb = 0
a.sort(reverse = True)
 
for i in range(len(a)):
  if i%2 == 0:
    suma += a[i]
  else:
    sumb += a[i]
    
print(suma-sumb)
P=sum(map(int,list(raw_input())));print min(P,N-P)*2

### FIXED CODE ###

#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18

S = raw_input()
cnt1 = cnt2 = 0
for c in S:
    if c == '0':
        cnt1 += 1
    else:
        cnt2 += 1

print min(cnt1, cnt2) * 2

exit()

A, B, K = map(int, raw_input().split())

cnt = 0

for i in range(1, 200):
    if A % i == 0 and B % i == 0:
        cnt += 1
    if cnt == K:
        print i
        exit()
from collections import deque

MOD = 10**9+7
INF = 10**18+10

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

if N == K:
    ans = 1
    for a in A:
        ans *= a
        ans %= MOD
    print(ans)
    exit()

# 個別を読んでいく
not_negative = []
negative = []
for a in A:
    if a < 0:
        negative.append(a)
    else:
        not_negative.append(a)


negR = sorted(negative, reverse=True)

# 全部負で奇数個選ぶとき，答えは負なので最小にする
if len(negative) == N and K % 2 == 1:
    ans = 1
    for k in range(K):
        ans *= negR[k]
        ans %= MOD
    print(ans)
    exit()


not_negative.sort(reverse=True)
negative.sort()

# dequeに入れて2つずつ取る
not_negative = deque(not_negative)
negative = deque(negative)
ans = 1
count = 0

while count < K:
    # あと1つしか使えないとき，負を2つ使えない
    flag1 = count == K - 1
    # 残りの負が1つしかない (2つ使えない)
    flag2 = len(negative) < 2
    # |x1 x2| > |y1 y2| (解法2)
    flag3 = len(not_negative) >= 2 and not_negative[0] * not_negative[1] > negative[0] * negative[1]
    if flag1 or flag2 or flag3:
        ans = ans * not_negative.popleft() % MOD
        count += 1
    else:
        ans = ans * negative.popleft() * negative.popleft() % MOD
        count += 2

print(ans)
        

### FIXED CODE ###

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

neg_a = sorted([a for a in A if a < 0], reverse=True)
pos_a = sorted([a for a in A if a >= 0])
ans = 1

if len(pos_a) == 0 and K % 2 == 1:
    for a in neg_a[:K]:
        ans = ans * a % MOD
    print(ans)
    exit()

while K > 0:
    if K == 1 or len(neg_a) <= 1:
        if len(pos_a) == 0:
            ans *= neg_a.pop()
        elif len(pos_a) > 0:
            ans *= pos_a.pop()
        K -= 1
    elif len(pos_a) <= 1:
        ans *= neg_a.pop() * neg_a.pop()
        K -= 2
    elif pos_a[-1] * pos_a[-2] > neg_a[-1] * neg_a[-2]:
        ans *= pos_a.pop()
        K -= 1
    else:
        ans *= neg_a.pop() * neg_a.pop()
        K -= 2
    ans %= MOD

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

#print(n,q)
edge = []
for i in range(n-1):
    a = list(map(int, input().split()))
    edge.append(a)

add_list = []
for i in range(q):
    p = list(map(int, input().split()))
    add_list.append(p)

#print(edge,add_list)


dir_edge = [[] for i in range(n)]

for e in edge:
    dir_edge[e[0]-1].append(e[1]-1)
    dir_edge[e[1]-1].append(e[0]-1)
print(dir_edge)


add_value = [0]*n
for v in add_list:
    add_value[v[0]-1] += v[1]
print(add_value)



def dfs(index, parent,value):
    value += add_value[index]
    dp[index] = value
    for i in dir_edge[index]:
        if (parent == i):
            continue
        dfs(i,index,value)
        

dfs(0, -1, 0)
print(*dp)

### FIXED CODE ###

n,q = map(int,input().split())

#print(n,q)
edge=[]
for i in range(n-1):
    a = list(map(int,input().split()))
    edge.append(a)

add_list = []
for i in range(q):
    p = list(map(int,input().split()))
    add_list.append(p)

#print(edge,add_list)

ans = [0] * n
edge_list = [-1] * n

for e in edge:
    edge_list[e[1]-1] = e[0]-1

add_value = [0]*n
for v in add_list:
    add_value[v[0]-1] += v[1]

#print(edge_list)
#print(add_value)


dp = [-1] * n
def get_value(i):
    if(dp[i]!=-1):
        return dp[i]
    tmp = add_value[i]
    if edge_list[i] != -1:
        tmp += get_value(edge_list[i])
    dp[i] = tmp
    return dp[i]

for i in range(n):
    ans[i] = get_value(i)
    #print(i,ans)

print(' '.join(map(str,ans)))
import math

N = int(input())
A = [int(a) for a in input().split()]

# L[i] = gcd(A[:i + 1])
# R[i] = gcd(A[i:])
L = [0] * N
L[0] = A[0]
for i in range(1, N):
    L[i] = math.gcd(L[i-1], A[i])
R = [0] * N
R[-1] = A[-1]
for i in range(N - 2, -1, -1):
    R[i] = math.gcd(R[i+1], A[i])

G = [0] * N
G[0]  = R[1]
G[-1] = L[-2]
for i in range(1, N - 1):
    G[i] = math.gcd(L[i-1], R[i+1])

print(max(G))


### FIXED CODE ###

# math.gcd is introduced in python 3.5
def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a

N = int(input())
A = [int(a) for a in input().split()]

# L[i] = gcd(A[:i + 1])
# R[i] = gcd(A[i:])
L = [0] * N
L[0] = A[0]
for i in range(1, N):
    L[i] = gcd(L[i-1], A[i])
R = [0] * N
R[-1] = A[-1]
for i in range(N - 2, -1, -1):
    R[i] = gcd(R[i+1], A[i])

G = [0] * N
G[0]  = R[1]
G[-1] = L[-2]
for i in range(1, N - 1):
    G[i] = gcd(L[i-1], R[i+1])

print(max(G))
n = int(input())
if n <= 9:
  print(n)
elif n <= 99:
  print(9)
elif n <= 999:
  print(9+n-100+1)
elif n <= 9999:
  print(909)
elif n <= 99999:
  print(909+n-10000+1)
else:
  print(90909)

### FIXED CODE ###

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

if n[2]-n[0]+n[1] > 0:
  print(n[2]-n[0]+n[1])
else:
  print(0)
N = int(input())
a = [int(i) for i input().split()]
print(sum(a) - N)

### FIXED CODE ###

N = int(input())
a = [int(i) for i in input().split()]

print(sum(a) - N)
n=input()
print("Yes" if n[0]==n[1]==n[2] elif  n[3]==n[1]==n[2] else "No")

### FIXED CODE ###

n=input()
print("Yes" if n[0]==n[1]==n[2] or n[3]==n[1]==n[2] else "No")
import math

K = int(input())



cnt = 0
  for i in range(1, K+1):
      for j in range(1, K + 1):
          for k in range(1, K + 1):
              cnt += math.gcd(k, math.gcd(i, j))


print(apt(K))


### FIXED CODE ###

import math
from numba import jit

K = int(input())


@jit
def apt(N):
    cnt = 0
    for i in range(1, K+1):
        for j in range(1, K + 1):
            for k in range(1, K + 1):
                cnt += math.gcd(k, math.gcd(i, j))
    return cnt


print(apt(K))
n = int(input())

for i in range(1:10):
  for j in range(1:10):
    if i * j == n:
      print("Yes")
    else:
      print("No")


### FIXED CODE ###

n = int(input())

for i in range(10):
  for j in range(10):
    if i * j == n:
      print("Yes")
      exit()
print("No")