Harryxun/stf_run huggingface dataset:
import math
import itertools
# print(math.gcd(1000000000, 1000000000))

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

result = 10 ** 9 + 1

for comb in list(itertools.combinations(monsters,2)):
    gcd = math.gcd(comb[0], comb[1]) 
    if gcd < result:
        result = gcd

print(result)

### FIXED CODE ###

import fractions
import itertools
from functools import reduce
# print(math.gcd(1000000000, 1000000000))


def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

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

result = 10 ** 9 + 1

print(gcd(*monsters))
import sys
def main():
    input = sys.stdin.readline
    S = input()
    if S == "Sunny":
        ans = "Cloudy"
    elif S == "Cloudy":
        ans = "Rainy"
    elif S == "Rainy":
        ans = "Sunny"
    print(ans)
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    S = input()
    if S == "Sunny":
        ans = "Cloudy"
    elif S == "Cloudy":
        ans = "Rainy"
    elif S == "Rainy":
        ans = "Sunny"
    print(ans)
if __name__ == '__main__':
    main()
s = input()
s[3] = "8"
print(s)

### FIXED CODE ###

s = list(input())
s[3] = "8"
x = ""
for i in range(len(s)):
  x += s[i]
print(x)
1 S = input()
2 print(min(abs(int(S[i:i+3]) - 753) for i in range(len(S) - 2)))

### FIXED CODE ###

S = input()
print(min(abs(int(S[i:i+3]) - 753) for i in range(len(S) - 2)))
a,b,c=map(int,input().split())
if d>c:
  print("delicious")
elif abs(b-c)>a:
  print("dangerous")
else:
  print("safe")

### FIXED CODE ###

a,b,c=map(int,input().split())
if b>=c:
  print("delicious")
elif abs(b-c)>a:
  print("dangerous")
else:
  print("safe")
import math
a,b,c = map(int, input().split())
if c % math.gcd(a, b) == 0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a,b,c = map(int, input().split())
cnt = 0
for i in range(b+1):
    if i*a%b == c:
        cnt =+ 1
        break
    else:
        continue
print("YES" if cnt == 1 else "NO")
from collections import defaultdict

n, k = map(int, input().split())
sushi = [list(map(int, input().split())) for _ in range(n)]
sushi.sort(key=lambda x: x[1])
t = defaultdict(int)
x = list(range(n - 1, n - k - 1, -1))
z = [0]
for i in range(n - k, n):
    t[sushi[i][0]] += 1
    z[0] += sushi[i][1]

y = []
yd = list(t.keys())
for i in range(n - k - 1, -1, -1):
    if sushi[i][0] not in yd:
        y.append(i)
        yd.append(sushi[i][0])
y = y[::-1]
k = 1

for k in range(1, len(y) + 1):
    for i in range(len(x) - 1, -1, -1):
        xi = x[i]
        if t[sushi[xi][0]] > 1:
            t[sushi[xi][0]] -= 1
            z.append(z[-1] - sushi[xi][1] + sushi[y[-k]][1])
            x.pop(i)
            break

p = len(t.keys())
ans = 0
for i in range(len(z)):
    ans = max(z[i] + (p + i) ** 2)
print(ans)


### FIXED CODE ###

import heapq

n, k = map(int, input().split())
sushi = [list(map(int, input().split())) for _ in range(n)]
sushi.sort(key=lambda x: x[1])
t = {}
x = []
z = 0
for i in range(n - 1, n - k - 1, -1):
    ti, di = sushi[i]
    if ti in t.keys():
        heapq.heappush(x, di)
        t[ti] += 1
    else:
        t[ti] = 1
    z += di

p = len(t.keys())
ans = z + p ** 2
for i in range(n - k - 1, -1, -1):
    if len(x) == 0:
        break
    ti, di = sushi[i]
    if ti not in t.keys():
        t[ti] = 1
        z += di - heapq.heappop(x)
        p += 1
        ans = max(ans, z + p ** 2)

print(ans)
import math

A,B,C = map(int, input().split())

ret = C % math.gcd(A,B) == 0
print('Yes' if ret else 'No')

### FIXED CODE ###

import fractions
 
A,B,C = map(int, input().split())
 
ret = C % fractions.gcd(A,B) == 0
print('YES' if ret else 'NO')
deglist = raw_input().split(" ")
a = int(deglist[0])
b = int(deglist[1])

d = a / b
r = a % b
f = 1.0 * a / b

print("{0} {1} {2.5f}".format(d, r, f))

### FIXED CODE ###

deglist = raw_input().split(" ")
a = int(deglist[0])
b = int(deglist[1])

d = a / b
r = a % b
f = 1.0 * a / b

print("{:} {:} {:.5f}".format(d, r, f))
N = int(input())
A = list(map(int,input().split()))
dp = [[-1 for _ in range(N+1)] for _ in range(100)]
dp[0][0] = 1000
for n in range(1,N):
    for i in range(250):
        # n日目
        for j in range(250):
        # n-1日目
            if dp[j][n-1] != -1:
                dp[i][n] = max(dp[j][n-1]+(j-i)*A[n-1],dp[i][n])
ans = 1000
for i in range(20):
    if dp[i][-2] != -1:
        if dp[i][-2]+i*A[-1] > ans:
            ans = dp[i][-2]+i*A[-1]
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
# 単純な話
money = 1000
stock = 0
for i in range(N-1):
    if A[i]<A[i+1]:
        stock += money//A[i]
        money %= A[i]
        money += stock*A[i+1]
        stock = 0
print(money)
l = input().split(' ')
a,b,c,x,y = int(l[0]),int(l[1]),int(l[2]),int(l[3]),int(l[4])

place = []

place.append( a * x + b * y )

if x-y > 0:
    place.append(c * x * 2)
else:
    place.append(c * y * 2)

if x < y :
    place.append(c * x * 2 + b * (y-x))
else :
    place.append(c * y * 2 + a * (x-y))
    
print(sorted(place)[0])


### FIXED CODE ###

s = input()

num = s.count('o')

print( 700 + num *100 )
n,a,b=[int(i) for i in input().split()]
ptint(min(n*a,b))


### FIXED CODE ###

n,a,b=map(int,input().split())
print(min(n*a,b))
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
for i in range(n):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")
N, x = list(map(int, input().split()))
a = list(map(int, input().split()))
min_index = a.index(min(a))
index_list = list(range(min_index,N)) + list(range(min_index))
cost = a.copy()
c_count = [0]*N
for i in range(1,N):
    if cost[index_list[i]] > (cost[index_list[i-1]]+x):
        cost[index_list[i]] = cost[index_list[i-1]]+x
        c_count[index_list[i]] = c_count[index_list[i-1]]+1

print(sum(cost) - sum(c_count)*x + max(c_count)*x  )


### FIXED CODE ###

A, B, C = list(map(int, input().split()))
if (A*B*C)%2 == 0:
    print('0')
else:
    print('%s' % str(min(min(A*B, B*C),C*A)) )
N,M=map(int,inputt().split())
print(N*(N-1)/2+M*(M-1)/2)

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
N, M = map(int, readline().split())
x = M * (M - 1) // 2
x += N * (N - 1) // 2
print(x)
A, B, C = map(int, input().split())
K= int(input()) 
 
 
for i in range(K):
  B=B*2
if (B>A)&(C>B):
  print("Yes")
else :
  print("No")

### FIXED CODE ###

s = int(input()) 
 
if 400 <= s <= 599:
  print("8")
elif  600 <= s <=799:
        print("7")
elif  800 <= s <=999:
        print("6")
elif  1000 <= s <=1199:
        print("5")
elif  1200 <= s <=1399:
        print("4")
elif  1400 <= s <=1599:
        print("3")
elif  1600 <= s <=1799:
        print("2")
elif  1800 <= s <=1999:
        print("1")
scores=[]
stamp=[]
N,M=map(int,input().split())
dp=[0 for i in range(N)]
d=[[] for i in range(N)]
for i in range(M):
    x,y=map(int,input().split())
    d[x-1].append(y-1)

def depth(now,score):
    global scores,stamp,dp
    stamp.append(now)
    if d[now]:
        for i in d[now]:
             if dp[i]==0 or not(dp[i]):
                dp[i]=depth(i,score+1)
             else :
                 scores.append(score+dp[i])
    else:
        scores.append(score)
        return score


Max=0
for i in range(N):
    if not(i in stamp):
        depth(i,0)
        dp[i]=max(scores)
        if scores and dp[i]>Max:
            Max=max(scores)
        scores=[]
print(Max)



### FIXED CODE ###

import numpy as np
import sys
sys.setrecursionlimit(100000)
N,M=map(int,input().split())
d=[[] for i in range(N)]
for i in range(M):
    x,y=map(int,input().split())
    d[x-1].append(y-1)
dp=[0 for i in range(N)]

def depth(now,score,d):
    global dp
    if dp[now]==0 or not(dp[now]):
        if d[now]:
            _score=[]
            for i in d[now]:
                _score.append(depth(i,score+1,d)-score)
            dp[now]=max(_score)
        else:
            return score

        return dp[now]+score

    else:
        return dp[now]+score



Max=0
for i in range(N):
    m=depth(i,0,d)
    if  m>Max:            
        Max=m
print(Max)
n = int (input())
print (n*(n+1)/2))


### FIXED CODE ###

n = int (input())
result =0
for i in range(1,n+1):
    result =result +i
print (result)
A = input()
B = input()
C = input()
if A[-1] == B[0] and B[-1] == C[0]:
    print('Yes')
else:
    print('No')



### FIXED CODE ###

A,B,C = map(str,input().split())
if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('NO')
#!/usr/bin/env python3
import sys, math, fractions, itertools

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(H: int, W: int, s: "List[str]"):
    flag = True
    for h in range(H):
        for w in range(W):
            if s[h][w] == '#':
                if h == H-1: U = False
                else: U = s[h+1][w] != '#'
                if h == 0: D = False
                else: D = s[h-1][w] != '#'
                if w == 0: L = False
                else: L = s[h][w-1] != '#'
                if w == W-1: R = False
                else: R = s[h][w+1] != '#'
                if all([U, D, L, R]):
                    flag = False
    if flag:
        print('Yes')
    else:
        print('No')
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    s = [ next(tokens) for _ in range(W) ]  # type: "List[str]"
    solve(H, W, s)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys, math, fractions, itertools

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(H: int, W: int, s: "List[str]"):
    flag = True
    for h in range(H):
        for w in range(W):
            if s[h][w] == '#':
                if h == H-1: U = True
                else: U = s[h+1][w] != '#'
                if h == 0: D = True
                else: D = s[h-1][w] != '#'
                if w == 0: L = True
                else: L = s[h][w-1] != '#'
                if w == W-1: R = True
                else: R = s[h][w+1] != '#'
                if all([U, D, L, R]):
                    flag = False
    if flag:
        print('Yes')
    else:
        print('No')
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    s = [ next(tokens) for _ in range(H) ]  # type: "List[str]"
    solve(H, W, s)

if __name__ == '__main__':
    main()
P=0
P+=B[A[0]-1]
for i in range(N-1):
    if A[i]!=N:
        u=B[A[i+1]-1]
        q=C[A[i+1]-2]
        o=u+q
        P+=o
    else:
        u=B[A[i+1]-1]
        P+=u
    
print(P)

### FIXED CODE ###

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

P=0
P+=B[A[0]-1]
for i in range(N-1):
    if A[i]!=N and A[i+1]==A[i]+1:
        u=B[A[i+1]-1]
        q=C[A[i+1]-2]
        o=u+q
        P+=o
    else:
        u=B[A[i+1]-1]
        P+=u
    
print(int(P))
a,b=map(int,input().split())
if a < b :
    print(aをb桁)
elif b < a :
    print(bをa桁)
else :
    print(aをb桁)

### FIXED CODE ###

a,b = input().split()
atxt = ''.join([a for _ in range(int(b))])
btxt = ''.join([b for _ in range(int(a))])
if atxt <= btxt :
    print(atxt)
else :
    print(btxt)
# -*- coding:utf-8 -*-
def permutation_formula(n, r):
    return factorial(n) // factorial(n-r)

def combination_formula(n, r):
    return factorial(n) // (factorial(r)*factorial(n-r))

def solve():
    N, K = list(map(int, input().split()))
    B, R = K, N-K
    MOD = 10**9+7

    for i in range(1, K+1):
        if i == 1:
            ans = combination_formula(R+i, i)
            ans %= MOD
        else:
            ans = combination_formula(R+i, i) - (R+i-i+1)
            ans %= MOD
            if B-i > 0:
                ans *= combination_formula(B-i+i-1, i-1)
                ans %= MOD
        print(ans)



if __name__ == "__main__":
    solve()


### FIXED CODE ###

# -*- coding:utf-8 -*-
import sys
sys.setrecursionlimit(100000)  # RecursionError対策

"""解説
(1) まず、赤いボールをN-K個一列に並べる

(2) 赤いボールと赤いボールの隙間をi箇所選んで、そこに青いボールをK個置くことを考える

 R R R R R
0 1 2 3 4 5

    この選び方は、(N-K+1)C(i)通り

(3) それぞれの選び方について、青いボールをそれぞれの隙間に何個割り当てるかを考える。
    それぞれ1個以上割り当てる必要があるので、決め方は(K-1)C(i-1)通り。


[入力例1]
B B B R R

・i=1
Bの塊を挿入する位置は、
 R R  |  R R  |  R R
^     |   ^   |     ^
の3通り

で、

Bを分配する場合の数はそれぞれの場合において1通り

よって、3*1 = 3通り


・i=2
 R R  |  R R   |  R R
^ ^   | ^   ^  |   ^ ^
の3通り

で、

Bを分配する場合の数はそれぞれの場合において、

- 少なくとも1個ずつ分配すると、自由におけるBの数は1個
- 2箇所に玉1つを分配する場合の数は
(2)C(1) = 2通り

よって3*2 = 6通り

・i=3
 R R
^ ^ ^
の1通り


[重複組み合わせの考え方]
http://www7b.biglobe.ne.jp/~math-tota/suA/tamahako.htm

B-i個の玉を、区別のできるi個の箱に分ける場合の数みたいな計算をしたい。これは言い換えると、
B-i個の玉と、i-1個の区切りの重複組み合わせ。

・6個の玉を、区別のできる3つの箱に分ける場合の数
6個の玉と、2個のしきりの重複組み合わせ

○○○○|○○| (4,2,0)の場合
|○○|○○○○ (0,2,4)の場合

「8個のオブジェクトのうち、2個を選んでしきりにする」と同じなので、(8)C(2) = 28

"""
from math import factorial

def combination_formula(n, r):
    return factorial(n) // (factorial(r)*factorial(n-r))

def solve():
    N, K = list(map(int, input().split()))
    B, R = K, N-K
    MOD = 10**9+7

    for i in range(1, K+1):
        if R+1-i < 0:
            print(0)
            continue
        
        # R+1から、i個選ぶ
        ans = combination_formula(R+1, i)
        if B-i == 0:
            print(ans%MOD)
            continue
        # B-i個の玉を、区別のできるi個の箱に分ける場合の数みたいな計算をしたい。これは言い換えると、
        # B-i個の玉と、i-1個の区切りの重複組み合わせ。
        if B-i+i-1-(i-1) >= 0:
            ans *= combination_formula(B-i+i-1, i-1)%MOD
        print(ans%MOD)



if __name__ == "__main__":
    solve()
# -*- coding: utf-8 -*-

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

max = max(a, b)
if max > 101:
    max = 101

list = []

for ta in range(max):
    if ta == 0:
        continue
    elif a % ta == 0 and b % ta == 0:
        list.append(ta)

print(list[-c])

### FIXED CODE ###

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

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

max = 101
#if a < b:
#    max = a

list = []

for ta in range(max):
    if ta == 0:
        continue
    elif a % ta == 0 and b % ta == 0:
        list.append(ta)

print(list[-c])
a,b = map(int,input().split())

if a = b :
    print(a)
elif a > b:
    print(a-1)
elif a < b:
    print(a)

### FIXED CODE ###

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

if a == b :
    print(a)
elif a > b:
    print(a-1)
elif a < b:
    print(a)
from collections import deque
# N = int(input())
N, K = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]
MOD = 10 ** 9 + 7
A_p = []
A_n = []
for a in A:
  if a >= 0:
    A_p.append(a)
  else:
    A_n.append(-a)

A_p.sort(reverse=True)
A_n.sort(reverse=True)
A_p = deque(A_p)
A_n = deque(A_n)

p_top = 0
n_top = 0
ans_p = deque([])
ans_n = deque([])
for i in range(K):
  if len(A_p) == 0:
    ans_n.append(A_n.popleft())
  elif len(A_n) == 0:
    ans_p.append(A_p.popleft())
  elif A_p[0] >= A_n[0]:
    ans_p.append(A_p.popleft())
  else:
    ans_n.append(A_n.popleft())
if len(ans_n) % 2 == 1:
  if len(ans_p) == 0 and len(A_p) > 0:
    ans_n.pop()
    ans_p.append(A_p.popleft())
  elif len(ans_n) == 0 and len(A_n) > 0:
    ans_p.pop()
    ans_n.append(A_n.popleft())
  elif len(ans_p) > 0 and len(ans_n) > 0 and ans_p[-1] >= ans_n[-1] and len(A_p) > 0:
    ans_n.pop()
    ans_p.append(A_p.popleft())
  elif len(ans_p) > 0 and len(ans_n) > 0 and ans_p[-1] < ans_n[-1] and len(A_n) > 0:
    ans_p.pop()
    ans_n.append(A_n.popleft())
ans = 1
for a in ans_p:
  ans = (a * ans) % MOD
for a in ans_n:
  ans = (a * ans) % MOD
if ans != 0 and len(ans_n) % 2 == 1:
  ans = 1
  A = [a for a in A if a < 0]
  A.sort(reverse=True)
  for i in range(K):
    ans = (ans * A[i]) % MOD
print(ans)




### FIXED CODE ###

from collections import deque
# N = int(input())
N, K = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]
MOD = 10 ** 9 + 7
A_p = []
A_n = []
for a in A:
  if a >= 0:
    A_p.append(a)
  else:
    A_n.append(-a)

A_p.sort(reverse=True)
A_n.sort(reverse=True)
A_p = deque(A_p)
A_n = deque(A_n)

p_top = 0
n_top = 0
ans_p = deque([])
ans_n = deque([])
for i in range(K):
  if len(A_p) == 0:
    ans_n.append(A_n.popleft())
  elif len(A_n) == 0:
    ans_p.append(A_p.popleft())
  elif A_p[0] >= A_n[0]:
    ans_p.append(A_p.popleft())
  else:
    ans_n.append(A_n.popleft())
if len(ans_n) % 2 == 1:
  if len(ans_p) == 0 and len(A_p) > 0:
    ans_n.pop()
    ans_p.append(A_p.popleft())
  elif len(ans_n) == 0 and len(A_n) > 0:
    ans_p.pop()
    ans_n.append(A_n.popleft())
  elif len(ans_p) > 0 and len(ans_n) > 0 and len(A_p) > 0 and len(A_n) > 0 and ans_p[-1] * A_p[0] >= ans_n[-1] * A_n[0]:
    ans_n.pop()
    ans_p.append(A_p.popleft())
  elif len(ans_p) > 0 and len(A_n) > 0:
    ans_p.pop()
    ans_n.append(A_n.popleft())
  elif len(ans_n) > 0 and len(A_p) > 0:
    ans_n.pop()
    ans_p.append(A_p.popleft())
ans = 1
for a in ans_p:
  ans = (a * ans) % MOD
for a in ans_n:
  ans = (-a * ans) % MOD
if ans != 0 and len(ans_n) % 2 == 1:
  ans = 1
  A_abs = [abs(a) for a in A]
  A_abs.sort()
  for i in range(K):
    ans = (ans * A_abs[i]) % MOD
  ans = (-ans) % MOD
print(ans)
while l:
    x = map(int,raw_input().split())
    x.sort()
    if sum(x) == 0:
    break
    else:
    print x[0], x[1]

### FIXED CODE ###

while 1:
    x = map(int, raw_input().split())
    x.sort()
    if sum(x) == 0:
        break
    else:
        print x[0],x[1]
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[]
  y=[]
  for j in range(a):
    x,y=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
c=0
for i in range(int(n/2)):
  l=[1]*n
  for j in range(i,n-i):
    #if l[j]==0:continue
    #for k in range(A[j]):
      #b=X[j][k]
      #l[b] *= Y[j][k]

if c < l.count(1):
  c=l.count(1) 
  
        
  
print(c)  
   

### FIXED CODE ###

n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
# 0028
import collections
array = [0]*100
i = 0
while True:
    a = input()
    if a == '': break
    array[i] = int(a)
    i += 1
array = filter(lambda a: a != 0, array)
counter = collections.Counter(array).most_common()
for a, count in counter:
    if count < counter[0][1]: break
    print(a)

### FIXED CODE ###

# 0028
array = []
while True:
    try:
        a = input()
        array.append(int(a))
    except EOFError: break
s = set(array)
mx = max(sorted(s, reverse=True), key = array.count)
for a in sorted(s, key = array.count, reverse=True):
    print(a)
    if a == mx: break
n,m=map(int,input().split())
a=[input() for i in range(n)]
b=[input() for i in range(m)]

for i in range(n-m):
    for j in range(n-m):
        flag=True
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l]!=b[k][l]:
                    flag=False
                    break
            if not flag:
                break
        if flag:
            print('Yes')
            break

if not flag:
    print('No')


### FIXED CODE ###

n,m=map(int,input().split())
a=[input() for i in range(n)]
b=[input() for i in range(m)]

for i in range(n-m+1):
    for j in range(n-m+1):
        flag=True
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l]!=b[k][l]:
                    flag=False
                    break
            if not flag:
                break
        if flag:
            print('Yes')
            break
    if flag:
        break

if not flag:
    print('No')
[i for i in [a,b,h]=[int(input()) for i in range(3)]
print((a+b)*h/2)

### FIXED CODE ###

[a,b,h]=[int(input()) for i in range(3)]
print((a+b)*h//2)
a,b,c,x,y=map(int, input().split())

ans = min(a*x+b*y, c*max(x,y)*2, c*x*2+max(0,(y-x)*b), c*y*2+max((x-y)*a)*a)

print(ans)

### FIXED CODE ###

a,b,c,x,y=map(int, input().split())

ans = min(a*x+b*y, c*max(x,y)*2, c*x*2+max(0,(y-x)*b), c*y*2+max(0,(x-y)*a))

print(ans)
N = int(input()) 
height = list(map(int, input().split())) #入力：花の高さ
water_count = 0 #水やり回数
while True:
    index = [i for i, v in enumerate(height) if v >0] #水をやる必要のある花のリスト インデックスが連続した範囲でしか水やりできない
    
    # 花の水やり範囲を決定
    min_index = index[0] #インデックスの最小値
    max_index = index[0] #インデックスの最大値
    
    while True:
        if max_index+1 in index:
            max_index += 1
        else:
            break
            
    # print("index: {}".format(index)) 
    
    water_amount = min(height[min_index:max_index+1]) #あげる水の量
    for flower in range(min_index, max_index+1):
        height[flower] -= water_amount #水やりカウンタ増やす
    
    # print("height:{} ".format(height))
    water_count +=water_amount
        
    if sum(height) ==0: #水やりが終わったら終了
        break
print(water_count)

### FIXED CODE ###

def solve(height):
    
    water_count = 0 #水やり回数

    while True:
        index = [i for i, v in enumerate(height) if v >0] #水をやる必要のある花のリスト インデックスが連続した範囲でしか水やりできない
    
        # 花の水やり範囲を決定
        min_index = index[0] #インデックスの最小値
        max_index = index[0] #インデックスの最大値
    
        while True:
            if (max_index+1) in index:
                max_index += 1
            else:
                break
    
        for flower in range(min_index, max_index+1):
            height[flower] -= 1 
        water_count += 1 #水やりカウンタ増やす
        
        if sum(height) == 0: #水やりが終わったら終了
            break
    print(water_count)
    
def solve_zero(height): #元々のリストがすべて０のとき
    print(0)

if __name__ == "__main__":
    N = int(input()) 
    height = list(map(int, input().split())) #入力：花の高さ
    if sum(height) == 0:
        solve_zero(height)
    else:
        solve(height)
import math

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


def solve():
    sorted_list = A

    for index in range(0, M):
        sorted_list = sorted(sorted_list)
        sorted_list[-1] = math.round(sorted_list[-1] / 2)

    return sum(sorted_list)


print(solve())


### FIXED CODE ###

import heapq

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


def solve():
    AA = [[-x, x] for x in A]

    heapq.heapify(AA)

    for i in range(M):
        x, y = heapq.heappop(AA)
        heapq.heappush(AA, [-(y//2), y//2])

    AAA = [x[1] for x in AA]
    return sum(AAA)


print(solve())
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n, p, *a = map(int, read().split())
cnt_1 = 0
cnt_2 = 0
for i in a:
    if a[i] % 2 == 1:
        cnt_1 += 1
    else:
        cnt_2 += 1
ans = 2 ** max(0, cnt_1 - 1) * 2 ** cnt_2
if p == 1 and cnt_1 == 0:
    ans = 0
print(ans)


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n, p = map(int, readline().split())
a = list(map(int, readline().split()))
cnt_1 = 0
cnt_2 = 0
for i in a:
    if i % 2 == 1:
        cnt_1 += 1
    else:
        cnt_2 += 1
ans = 2 ** max(0, cnt_1 - 1) * 2 ** cnt_2
if p == 1 and cnt_1 == 0:
    ans = 0
print(ans)