Harryxun/stf_run huggingface dataset:
a,b,c=input()
komoji=a[0]+b[0]+c[0]
print(komoji.upper())

### FIXED CODE ###

a,b,c=input().split()
komoji=a[0]+b[0]+c[0]
print(komoji.upper())
test=list(map(int, input().split()))

 def iroha():
 	if test==[5,5,7]:
		print("yes")
    elif test==[5,7,5]:
		print("yes")
    elif test==[7,5,5]:
        print("yes")
     else:
        print("no")

iroha()

### FIXED CODE ###

test=list(map(int, input().split()))
 
def iroha():
    if test==[5,5,7]:
        print("YES")
    elif test==[5,7,5]:
        print("YES")
    elif test==[7,5,5]:
        print("YES")
    else:
        print("NO")
 

iroha()
N, A, B= map(int,input().split())
L =N*A
if L > K:
  print(L)
else:
  print(B)

### FIXED CODE ###

N, A, B= map(int,input().split())
L =N*A
if L <= B:
  print(L)
else:
  print(B)
N = int(Input())
x,u = [""]*N
for i in range(N):
  x[i],u[i] = input().split()

sum = 0
for i in range(N):
  sum += x[i] if u[i] == "JPY" else x[i]*380000.0
       
print(sum)

### FIXED CODE ###

N = int(input())
x= [""]*(N+1)
u= [""]*(N+1)

for i in range(N):
  x[i],u[i] = input().split()

sum = 0
for i in range(N):
  sum += float(x[i]) if u[i] == "JPY" else float(x[i])*380000.0

  
print(sum)
n = int(input())
a = list(map(int,input().split()))
result = float('inf') 
for i in a:
    result = min(result,len(bin(i))-bin(i).rfind('1')-1)
print(result)

### FIXED CODE ###

N = int(input())
print(2**(len(bin(N))-3))
s = input()
g = float('inf')
for i in range(len(s)-2):
  if g > abs(int(s[i:i+3])-753):
  g = abs(int(s[i:i+3])-753)
print(g)

### FIXED CODE ###

s = input()
g = float('inf')
for i in range(len(s)-2):
  if g > abs(int(s[i:i+3])-753):
  	g = abs(int(s[i:i+3])-753)
print(g)
n,k = map(int,input(),split())
a = [0 for i in range(n)]

for i in range k:
  d = int(input())
  A = list(map(int,input(),split()))
    for j in A:
      a[j-1] += 1
      
print(a.count(0))

### FIXED CODE ###

n,k = map(int,input().split())
a = [i for i in range(n+1)]
d = []
A = []

for j in range(k):
  d.append(int(input()))
  A.append(list(map(int,input().split())))
  
  
for i in A:
  for j in i:
    if j in a:
      a.remove(j)
      
      
print(len(a)-1)
n=int(input())
xyh=[]
h0=[]
for i in range(n):
    a=[int(j) for j in input().split()]
    xyh.append(a)

for x in range(101):
    for y in range(101):
        p=0
        l=max(0,xyh[0][2]+abs(x-xyh[0][0])+abs(y-xyh[0][1]))
        for i in range(n):
            if xyh[i][2]==0:
                if l>abs(x-xyh[i][0])+abs(y-xyh[i][1]:
                    p=1
                    break
                else:
                    continue
            if l==max(0,xyh[i][2]+abs(x-xyh[i][0])+abs(y-xyh[i][1])):
                l=max(0,xyh[i][2]+abs(x-xyh[i][0])+abs(y-xyh[i][1]))
            else:
                p=1
                break
        if p==0:
            print(x,y,l)
            import sys
            sys.exit()
            



### FIXED CODE ###

n=int(input())
xyh=[]
h0=[]
for i in range(n):
    a=[int(j) for j in input().split()]
    xyh.append(a)

from operator import itemgetter
xyh.sort(key=itemgetter(2))
xyh.reverse()

for x in range(101):
    for y in range(101):
        p=0
        l=max(0,xyh[0][2]+abs(x-xyh[0][0])+abs(y-xyh[0][1]))
        for i in range(n):
            if xyh[i][2]==0:
                if l>abs(x-xyh[i][0])+abs(y-xyh[i][1]):
                    p=1
                    break
                else:
                    continue
            if l==max(0,xyh[i][2]+abs(x-xyh[i][0])+abs(y-xyh[i][1])):
                l=max(0,xyh[i][2]+abs(x-xyh[i][0])+abs(y-xyh[i][1]))
            else:
                p=1
                break
        if p==0:
            print(x,y,l)
            import sys
            sys.exit()
NK = list(map(int, input().split()))
P = list(map(int, input().split()))
S =[0] * (NK[0] - NK[1])

for i in range(NK[0] - NK[1]):
    S[i] = sum(P[i:i+NK[1]])

print((max(S) + NK[1]) / 2)

### FIXED CODE ###

N, K = map(int, input().split())
P = list(map(int, input().split()))
S =[0] * (N - K + 1)
S[0] = sum(P[0:K])

for i in range(1, N - K + 1):
    S[i] = S[i-1] - P[i-1] + P[i+K-1]

print((max(S) + K) / 2)
N,K = map(int, input().split())
if K > (N*(N-1)//2)-(N-1):
    print(-1)
    exit()
else:
    hen = [[0,0] for _ in range((N-1)+K)]
    for i in range(2,N+1):
        hen[i-2] = [1,i]
    tmp = 1
    for j in range(2,N):
        for k in range(j+1,N+1):
            hen[N-2+tmp] = [j,k]
            tmp += 1
            if tmp == ((N-1)*(N-2)//2)-K+1:
                break
        if tmp == ((N-1)*(N-2)//2)-K+1:
            break
    print(len(hen))
    for l in hen:
        print(*l)

### FIXED CODE ###

N,K = map(int, input().split())
if K > (N*(N-1)//2)-(N-1):
    print(-1)
    exit()
else:
    hen = [[0,0] for _ in range((N-1)+((N-1)*(N-2)//2)-K)]
    for i in range(2,N+1):
        hen[i-2] = [1,i]
    tmp = 1
    br = 0
    if hen[-1] !=[0,0]:
        print(len(hen))
        for l in hen:
            print(*l)
        exit()
    for j in range(2,N):
        for k in range(j+1,N+1):
            hen[N-2+tmp] = [j,k]
            tmp += 1
            if N-2+tmp == len(hen):
                br = 1
                break
        if br == 1:
            break
    print(len(hen))
    for l in hen:
        print(*l)
i = 0
while 1:
   x = raw_input()
   i = i +1
   if x == 0: 
     break
   print ("Case %d: %d") % (i,x)

### FIXED CODE ###

i = 0
while 1:
   x = int(raw_input())
   i = i + 1
   if x == 0:
      break
   print 'Case %s: %s' %(i, x)
n,k,c = map(int,input().split())
s = input()
fro = []
bac = []

for i in range(n):
    if s[i] == "o" and (len(fro) == 0 or fro[-1]+c < i):
        fro.append(i)
    if s[n-i-1] == "o" and (len(bac) == 0 or bac[-1]-c > n-i):
        bac.append(n-i-1)

for i in range(k):
    if fro[i] == bac[-i-1]:
        print(fro[i]+1)


### FIXED CODE ###

n,k,c = map(int,input().split())
s = input()
fro = []
bac = []

for i in range(n):
    if s[i] == "o" and (len(fro) == 0 or fro[-1]+c < i):
        fro.append(i)
    if s[n-i-1] == "o" and (len(bac) == 0 or bac[-1]-c > n-i-1):
        bac.append(n-i-1)

for i in range(k):
    if fro[i] == bac[k-i-1]:
        print(fro[i]+1)
n,k = map(int, input().split(" "))
s = list(input())

s_num = []
s_first = s[0]
pre = s[0]
num = 0

for i in s:
    if pre == i:
        num += 1
    else:
        s_num.append(num)
        num = 1
        pre = "1" if pre == "0" else "0"
else:
    s_num.append(num)
ret = 0
if s_first == "0":
    ret = max(ret,sum(s_num[0:(2*k)]))
    for i in range(1,len(s_num)//2):
        ret = max(ret,sum(s_num[((i-1)*2+1):(2*(i+k))]))
else:
    ret = max(sum(s_num[0:(2*k+1)]))
    for i in range(1,len(s_num)//2):
        ret = max(ret,(sum(s_num[(i*2):(2*(k+i)+1)])))
 
print(ret)

### FIXED CODE ###

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

if s[0] == "0":
    s_num = [0]
else:
    s_num = []
pre = s[0]
num = 0

for i in s:
    if pre == i:
        num += 1
    else:
        s_num.append(num)
        num = 1
        pre = "1" if pre == "0" else "0"
else:
    s_num.append(num)

sums = [0]

for i,e in enumerate(s_num):
    sums.append(sums[i] + e)

ret = 0
sums_len = len(sums)-1
for i in range(0,len(sums),2):
    ret = max(ret,(sums[min(i+k*2+1,sums_len)] - sums[i]))
 
print(ret)
input();l=input().split();x=not'0'in l
for j in l:
  x=x*int(j)if x>1e18or x<0
print(x)

### FIXED CODE ###

i = input
i()
x = 1
l = i().split()
if '0' in l:
    print(0)
    quit()
for j in l:
    x *= int(j)
    if x > 1e18:
        print(-1)
        quit()
print(x)
l = list(map(int, input().split()))
a = list(map(int, input().split()))
n=sum(a)
if a[l[1]]>=n/(4*l[0]):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

l = list(map(int, input().split()))
a = list(map(int, input().split()))
fla=True
n=sum(a)
a.sort(reverse=True)
if a[l[1]-1]>=n/(4*l[1]):
    print('Yes')
else:
    print('No')
import math 

MOD = 10**9 + 7
N = int(input())
ABC = []
zero_cases = 0
for i in range(N):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        zero_cases = 1
    elif a * b >=0 and a != 0:
        ABC.append([ math.atan2(abs(b),abs(a)), abs(a), abs(b),1])
    else:
        ABC.append([math.atan2(abs(a),abs(b)), abs(b), abs(a), -1])
ABC.sort()
current_arg = ABC[-1][0]
group = []
daiich = 0
daini = 0
while ABC:
    current = ABC.pop()
    if current[0] == current_arg:
        if current[3]==1:
            daiich += 1
        else:
            daini += 1
    else:
        group += [[daiich, daini]]
        daiich = 0
        daini = 0
        if current[3]==1:
            daiich += 1
        else:
            daini += 1
        if ABC:
            current_arg = current[0]
else:
    group += [[daiich, daini]]
    daiich = 0
    daini = 0

ans = 1 + zero_cases
for u, v in group:
    ans *= (2**u + 2**v -1)
    ans %= MOD
print(ans-1)

### FIXED CODE ###

from math import gcd 
from collections import defaultdict

def to_irreducible(a, b):
    if a == 0:
        return [0, 1]
    GCD = gcd(a, b)
    return [a//GCD, b//GCD]

MOD = 10**9 + 7
N = int(input())
daiichi_dict = defaultdict(int)
daini_dict = defaultdict(int)
zero_cases = 0

for i in range(N):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        zero_cases += 1
    elif a * b >=0 and b != 0:
        a, b = to_irreducible(abs(a), abs(b))
        daiichi_dict[(a,b)] += 1
    else:
        a, b = to_irreducible(abs(b), abs(a))
        daini_dict[(a,b)] += 1
        daiichi_dict[(a,b)] += 0


ans = 1 
for key, value_daiichi in daiichi_dict.items():
    value_daini = daini_dict[key]
    ans *= (2**value_daiichi + 2**value_daini -1)
    ans %= MOD
print((ans+zero_cases-1) % MOD)
N, M, X = map(int, input().split())
Ca = [list(map(int, input().split())) for _ in range(N)]
pattern = []
for i in range(2**N):
    lis = []
    for j in range(N):
        if ((i>>j)&1):
            lis.append(Ca[j])
    pattern.append(lis)

cnt = []
for i in range(2**N):
    g = [0] * (M+1)
    for j in range(len(pattern[i])):
        for k in range(M+1):
            g[k] += pattern[i][j][k]
    if min(g[1:M]) < X:
        continue
    else:
        cnt.append(g[0])
if len(cnt) ==0:
    print(-1)
else:
    print(min(cnt))

### FIXED CODE ###

N, M, X = map(int, input().split())
Ca = [list(map(int, input().split())) for _ in range(N)]
pattern = []
for i in range(2**N):
    lis = []
    for j in range(N):
        if ((i>>j)&1):
            lis.append(Ca[j])
    pattern.append(lis)

cnt = []
for i in range(2**N):
    g = [0] * (M+1)
    for j in range(len(pattern[i])):
        for k in range(M+1):
            g[k] += pattern[i][j][k]
    if M==1 and g[1]< X:
        continue
    elif M>1 and min(g[1:M+1]) < X:
        continue
    else:
        cnt.append(g[0])
if len(cnt) ==0:
    print(-1)
else:
    print(min(cnt))
j=10501
l=[0 for i in range(j)]
for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      v=x*x+y*y+z*z+y*x+x*z+z*y
      if(v<j):
        l[v]+=1
for i in range(n+1):
  print(l[i+1]

### FIXED CODE ###

n=int(input())
j=10501
l=[0 for i in range(j)]
for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      v=x*x+y*y+z*z+y*x+x*z+z*y
      if(v<j):
        l[v]+=1
for i in range(n):
  print(l[i+1])
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

### FIXED CODE ###

def func():
    input_num = int(input(''))
    return 3*input_num**2


if __name__ == "__main__":
    print(func())
N = int(input())
X = input()
pc = X.count('1')

mod_plus_1 = int(X, 2) % (pc+1)
mod_minus_1 = int(X, 2) % (pc-1)


def f(x):
    if x == 0:
        return 0
    else:
        return f(x % bin(x).count('1'))+1


for i in range(N):
    if X[i] == '0':
        x = mod_plus_1
        x += 2**(N-1-i) % (pc+1)
        x %= (pc+1)
    else:
        x = mod_minus_1
        x -= 2**(N-1-i) % (pc-1)
        x %= (pc+1)
    if x == 0:
        print(1)
    else:
        print(f(x)+1)


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

N = int(input())
X = input()
pc = X.count('1')


if pc == 0:
    print(*[1]*N, sep='\n')
    exit()
elif pc == 1:
    if int(X, 2) == 1:
        for i in range(N-1):
            print(2)
        print(0)
        exit()
    else:
        for i in range(N):
            if i == N-1:
                print(2)
            elif X[i] == '0':
                print(1)
            else:
                print(0)
        exit()

mod_plus_1, mod_minus_1 = 0, 0
for i in range(N):
    mod_plus_1 = (mod_plus_1*2+int(X[i])) % (pc+1)
    mod_minus_1 = (mod_minus_1*2+int(X[i])) % (pc-1)


def f(x):
    if x == 0:
        return 0
    else:
        return f(x % bin(x).count('1'))+1


mods_p1, mods_m1 = [1 % (pc+1)], [1 % (pc-1)]
for i in range(N-1):
    mods_p1.append(mods_p1[-1]*2 % (pc+1))
    mods_m1.append(mods_m1[-1]*2 % (pc-1))
mods_p1 = mods_p1[::-1]
mods_m1 = mods_m1[::-1]


for i in range(N):
    if X[i] == '0':
        x = mod_plus_1 + mods_p1[i]
        x %= (pc+1)
    else:
        x = mod_minus_1 - mods_m1[i]
        x %= (pc-1)

    if x == 0:
        print(1)
    else:
        print(f(x)+1)
import sys

def input():
    return sys.stdin.readline()[:-1]

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

from itertools import accumulate
count = 0
acum = list(accumulate(a))

for i in range(N-1, -1, -1):
    if acum[i] >= K:
        count += 1
    else:
        break

for i in range(N):
    for j in range(N-1, i, -1):
        s = acum[j]-acum[i]
        if s >= K:
            count += 1
        else:
            break

print(count)


### FIXED CODE ###


X, A = map(int, input().split())

if(X < A):
    print(0)
else:
    print(10)
import sys

x = sys.argv[1]

y = ord(x)
y += 1
x = chr(y)
print(x)

### FIXED CODE ###

x = input()
y = ord(x)
y += 1
x = chr(y)
print(x)
sys.setrecursionlimit(4100000)
n = int(input())
a = [int(i) for i in input().split()]
current = a[0]
good = True
for i in range(1,n):
    if a[i] < a[i-1]:
        good = False
        break
    if a[i] == a[i-1]:
        continue
    if a[i] > a[i-1]:
        a[i] = a[i] - 1
if good:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)
n = int(input())
a = [int(i) for i in input().split()]
current = a[0]
good = True
for i in range(1,n):
    if a[i] < a[i-1]:
        good = False
        break
    if a[i] == a[i-1]:
        continue
    if a[i] > a[i-1]:
        a[i] = a[i] - 1
if good:
    print("Yes")
else:
    print("No")
import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def main():
    h, w = [int(i) for i in input().split()]
    c_h, c_w = [int(i) for i in input().split()]
    d_h, d_w = [int(i) for i in input().split()]
    grid = [["#"] * (w + 2)]
    for _ in range(h):
        line = ["#"] + list(input()) + ["#"]
        grid.append(line)
    grid.append(["#"] * (w + 2))
    warp_count = [[float("inf")] * (w + 2) for _ in range(h + 2)]
    directions = ((1, 0), (-1, 0), (0, 1), (0, -1))

    def dfs(_h, _w, warp):
        warp_count[_h][_w] = min(warp, warp_count[_h][_w])
        # walk
        for _a, _b in directions:
            if grid[_h + _a][_w + _b] != "#" and warp_count[_h + _a][_w + _b] > warp:
                dfs(_h + _a, _w + _b, warp)
        # warp
        for x in range(-2, 3):
            for y in range(-2, 3):
                if (x, y) in directions:
                    continue
                elif x == 0 and y == 0:
                    continue
                if _h + x < 0 or _h + x > h or _w + y < 0 or _w + y > w:
                    continue
                if grid[_h + x][_w + y] == "#":
                    continue
                if warp_count[_h + x][_w + y] > warp + 1:
                    dfs(_h + x, _w + y, warp + 1)

    dfs(c_h, c_w, 0)
    if warp_count[d_h][d_w] == float("inf"):
        print(-1)
    else:
        print(warp_count[d_h][d_w])
    return


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
from collections import deque


def input():
    return sys.stdin.readline().strip()


def main():
    INF = 10**7
    h, w = [int(i) for i in input().split()]
    c_h, c_w = [int(i) for i in input().split()]
    d_h, d_w = [int(i) for i in input().split()]
    grid = [["#"] * (w + 2)]
    for _ in range(h):
        line = ["#"] + list(input()) + ["#"]
        grid.append(line)
    grid.append(["#"] * (w + 2))
    warp_count = [[INF] * (w + 2) for _ in range(h + 2)]
    directions = ((1, 0), (-1, 0), (0, 1), (0, -1))
    warps = []
    for x in range(-2, 3):
        for y in range(-2, 3):
            if x == 0 and y == 0:
                continue
            if (x, y) not in directions:
                warps.append((x, y))

    stack = deque()
    warp_count[c_h][c_w] = 0
    stack.append((c_h, c_w, 0))

    while stack:
        _h, _w, warp = stack.pop()
        if warp > warp_count[_h][_w]:
            continue
        warp_count[_h][_w] = warp

        # walk
        for _a, _b in directions:
            if grid[_h + _a][_w + _b] != "#" and warp_count[_h + _a][_w + _b] > warp:
                stack.append((_h + _a, _w + _b, warp))

        # warp
        for x, y in warps:
            if _h + x < 0 or _h + x > h or _w + y < 0 or _w + y > w:
                continue
            elif grid[_h + x][_w + y] == "#":
                continue
            if warp_count[_h + x][_w + y] > warp + 1:
                stack.appendleft((_h + x, _w + y, warp + 1))

    if warp_count[d_h][d_w] == INF:
        print(-1)
    else:
        print(warp_count[d_h][d_w])
    return


if __name__ == "__main__":
    main()
#最大公約数を求める再帰関数-->計算量O(log(max(x))
def gcd(x, y):
    if x < y:
        x, y = y, x
    if y == 0:
        return x
    return gcd(x-y, y)


#本文
N = int(input())
list_A = list(map(int, input().split()))

#配列初期化
list_gcd = [0] * N
list_gcd_rev = [0] * N

#配列の最初のgcdを求める。定義
list_gcd[0] = list_A[0]
list_gcd_rev[N-1] = list_A[N-1]
#print (list_gcd, list_gcd_rev)

#配列にgcdを代入していく
for i in range(1,N):
    list_gcd[i] = gcd(list_gcd[i-1], list_A[i])
#print (list_gcd)
for j in range(1,N,):
    list_gcd_rev[N-1-j] = gcd(list_gcd_rev[N-j], list_A[N-1-j])
#print (list_gcd_rev)

#print (list_gcd, list_gcd_rev)

#k番目までの両端からのgcdを求める
ans = max(list_gcd[N-2], list_gcd_rev[1]) #両端の文字を除いたときの答え
#print (ans)
for k in range(1,N-1):
    a = list_gcd[k-1]
    b = list_gcd_rev[k+1]
    ans = max(ans, gcd(list_gcd[k-1], list_gcd_rev[k+1]))
print (ans)

### FIXED CODE ###

#最大公約数を求める再帰関数-->計算量O(log(max(x))
def gcd1(x, y):
    if x < y:
        x, y = y, x
    if y == 0:
        return x
    return gcd(x-y, y)

def gcd(x,y):
    if x<y:
        x,y=y,x
    #x>y
    if y==0:
        return x
    if x%y==0:
        return y
    else:
        return gcd(y,x%y)


#本文
N = int(input())
list_A = list(map(int, input().split()))

#配列初期化
list_gcd = [0] * N
list_gcd_rev = [0] * N

#以下　間違いを発見できず

##配列の最初のgcdを求める。定義
#list_gcd[0] = list_A[0]
#list_gcd_rev[N-1] = list_A[N-1]
##print (list_gcd, list_gcd_rev)

##配列にgcdを代入していく
#for i in range(1,N):
#    list_gcd[i] = gcd(list_gcd[i-1], list_A[i])
##print (list_gcd)
#for j in range(1,N):
#    list_gcd_rev[N-1-j] = gcd(list_gcd_rev[N-j], list_A[N-1-j])
##print (list_gcd_rev)

##print (list_gcd, list_gcd_rev)

##k番目までの両端からのgcdを求める
#if N == 2:
#    ans = gcd(list_gcd[0], list_gcd_rev[1])
#else:
#    ans = max(list_gcd[N-2], list_gcd_rev[1]) #両端の文字を除いたときの答え
##print (ans)
#for k in range(1,N-1):
#    a = list_gcd[k-1]
#    b = list_gcd_rev[k+1]
#    ans = max(ans, gcd(a, b))
#print (ans)

#以下、正答

for i in range(1,N):
    list_gcd[i]=gcd(list_gcd[i-1],list_A[i-1])
for i in range(N-1)[::-1]:
    list_gcd_rev[i]=gcd(list_gcd_rev[i+1],list_A[i+1])
Z = [gcd(list_gcd[i], list_gcd_rev[i]) for i in range(N)]
print (max(Z))
import copy

H, W = map(int, input().split())

def fib(msLst, i, j):
    if i > 0:
        msLst[i - 1][j] = '#'
    if i < W - 1:
        msLst[i + 1][j] = '#'
    if j > 0:
        msLst[i][j - 1] = '#'
    if j < H - 1:
        msLst[i][j + 1] = '#'

ansCnt = 0
masLst = [['' for i in range(H)] for j in range(W)]
for i in range(W):
    tmp = input()
    for j in range(len(tmp)):
        masLst[i][j] = tmp[j]

loopBoean = True
while loopBoean:
    msLst = copy.deepcopy(masLst)
    for i in range(W):
        for j in range(H):
            if masLst[i][j] == '#':
                fib(msLst, i, j)
    ansCnt += 1
    masLst = msLst

    jloop = True
    for i in range(W):
        for j in range(H):
            if masLst[i][j] != '#':
                jloop = False
                break
        if jloop == False:
            break
    if jloop == True:
        loopBoean = False

print(ansCnt)

### FIXED CODE ###

from collections import deque

def bfs():
    while len(que) != 0:
        p = que.popleft()
        for i in range(4):
            nextX = p[0] + moveR[i]
            nextY = p[1] + moveC[i]
            if 0 <= nextX and nextX < H\
                and 0 <= nextY and nextY < W\
                and s[nextX][nextY] != '#'\
                and s[nextX][nextY] == '.':
                s[nextX][nextY] = s[p[0]][p[1]] + 1
                que.append([nextX, nextY])

H, W = map(int, input().split())
s = [list(input()) for _ in range(H)]
moveR = [0, 1, -1, 0]
moveC = [1, 0, 0, -1]

que = deque()
for i in range(H):
    for j in range(W):
        if s[i][j] == '#':
            que.append([i, j])
            s[i][j] = 0
bfs()
ans = 0
for i in range(H):
    for j in range(W):
        ans = max(ans, s[i][j])
print(ans)
from collections import defaultdict
from heapq import heappush, heappop, heapify
from sys import stdin

def sp(G,R,V):
    d = {}
    q = [(0, R)]
    d[R] = 0
    heapify(q)
    while q:
        (cost, v) = heappop(q)
        for (next, c) in G[v].items():
            if v not in d:
                d[v] = c
            elif d[next] > d[v] + c:
                d[next] = d[v] + c
                heappush(q, (d[next], next))
    return d


V, E, R = [int(x) for x in stdin.readline().split()]
G = defaultdict(dict)
for case in range(E):
    s, t, w = [int(x) for x in stdin
    .readline().split()]
    G[s][t] = w
d = sp(G, R, V)
for k in range(V):
    if k not in d:
        print("INF")
    else:
        print(d[k])

### FIXED CODE ###

from collections import defaultdict
from collections import deque
from sys import stdin
#time 2.49
def sp(G,R,V):
    d = {}
    INF = float('inf')
    for i in range(V):
        d[i] = INF
    d[R] = 0
    q = deque([(0, R)])
    while q:
        (cost, v) = q.popleft()
        for (u, c) in G[v].items():
            if d[u] > d[v] + c:
                d[u] = d[v] + c
                q.append((d[u], u))
    return d

V, E, R = [int(x) for x in stdin.readline().split()]
G = defaultdict(dict)
for case in range(E):
    s, t, w = [int(x) for x in stdin.readline().split()]
    G[s][t] = w
d = sp(G, R, V)
for k in range(V):
        if d[k] == float('inf'):
            print("INF")
        else:
            print(d[k])
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
print(A[0] + sum(A[1:1+(N-2)//2])*2 + ((N-2)%2)*A[1+1+(N-1)//2])

### FIXED CODE ###

# 貪欲に大きい順に入れていって，入れる場所はもっとも周りが大きくなる場所
# この方針は正しいただし，値の取り出しだけではなく挿入が起こるので，優先度付きキュー（heap）を使う必要があるっ
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
import heapq
C = []
# heapは最小値しか取り出せないことに注意
heapq.heapify(C)
ans = 0
# 初期条件として2つの値を挿入する
heapq.heappush(C,-A[0])
for i in range(1,N):
    tmp = heapq.heappop(C)
    ans += -tmp
    heapq.heappush(C, -A[i])
    heapq.heappush(C, -A[i])
print(ans)
N,K =[int(i)for input().split()]
if 2*K-1 <= N:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

N,K =[int(i)for i in input().split()]
if 2*K-1 <= N:
  print("YES")
else:
  print("NO")
n= input()
t = list(n)
t = [int(i) for i in t]
s = 0
for j in t:
  s += j

if n % s == 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n= input()
t = list(n)
t = [int(i) for i in t]
s = 0
for j in t:
  s += j

if int(n) % s == 0:
  print("Yes")
else:
  print("No")