Harryxun/stf_run huggingface dataset:
H,W,K=map(int,input().split())
L=[list(map(int,input().split())) for i in range(H)]
ans=0
for i in range(2**H):
    for j in range(2**W):
        C=deepcopy.(L)
        for k range(H):
            if (i>>k&1):
                C[k]=["r"]*W
        for l range(W):
            if (j>>l&1):
                for m range(H):
                    C[l][m]="r"
        count=0
        for i in range(H):
            for j in range(W):
                if C[i][j]=="#":
                    count+=1
        if count==K:
            ans+=1
print(ans)


### FIXED CODE ###

import copy
H,W,K=map(int,input().split())
L=[[x for x in input()] for i in range(H)]
ans=0
for i in range(2**H):
    for j in range(2**W):
        C=copy.deepcopy(L)
        for k in range(H):
            if (i>>k&1):
                C[k]=["r"]*W
        for l in range(W):
            if (j>>l&1):
                for m in range(H):
                    C[m][l]="r"
        count=0
        for p in range(H):
            for q in range(W):
                if C[p][q]=="#":
                    count+=1
        if count==K:
            ans+=1
print(ans)
n = int(input())
 
flg = True
t_ = 0
x_ = 0
y_ = 0
for i in range(n):
  t, x, y = map(int, input().split())
  t_ -= t
  x_ -= x
  y_ -= y
  
  if (t_ - x_ - y_) % 2 != 0:
    print('No')
    flg = False
    break
 
if flg:
  print('Yes')

### FIXED CODE ###

a, b = map(int, input().split())
 
if a % 2 == 1 and b % 2 == 1:
  print('Odd')
else:
  print('Even')
n=int(input())
if n%11>6:
  print(n//11*2+2)
elif n%11>0
  print(n//11*2+1)
else:
  print(n//11*2)

### FIXED CODE ###

n=int(input())
if n%11>6:
  print(n//11*2+2)
elif n%11>0:
  print(n//11*2+1)
else:
  print(n//11*2)
import bisect
import numpy as np
n, d, a = map(int, input().split())
XH = sorted([list(map(int, input().split())) for _ in range(n)])
X, H = zip(*XH)
K = np.array([-(-i//a) for i in H])
ans = 0
for now in range(n):
  l = K[now]
  if l > 0:
    ans += l
      K[now:bisect.bisect_right(X, X[now]+2*d)] -= l
print(ans)

### FIXED CODE ###

import bisect
n, d, a = map(int, input().split())
XH = sorted([list(map(int, input().split())) for _ in range(n)])
X, H = zip(*XH)
K = [-(-i//a) for i in H]
L = [0]*(n+2)
ans = 0
for i in range(n):
  L[i+1] += L[i]
  s = max(K[i]-L[i+1], 0)
  ans += s
  L[i+1] += s
  L[bisect.bisect_right(X, X[i]+2*d)+1] -= s
print(ans)
a=int(input())
b=0
xy = [map(int, input().split()) for in range(a)]
for i in range(a-2):
  if a[i]==a[i+1]==a[i+2]:
    b=b+1
if b==0:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

a=int(input())
b=0
xy = [map(int, input().split()) for _ in range(a)]
x, y = [list(i) for i in zip(*xy)]
for i in range(a-2):
  if x[i]==y[i] and x[i+1]==y[i+1] and x[i+2]==y[i+2]:
    b=b+1
if b==0:
  print("No")
else:
  print("Yes")
from math import factorial

def nCr(n, r):
  return factorial(n) // (factorial(n - r) * factorial(r))
  
mod = 10**9 + 7 
 
N,K = map(int,input().split())

for i in range(K):
  # 赤を仕切りと考える、仕切りの左右には箱(N-K+1個)がある、その中のどの箱(i+1個)を用いるか
  box_comb = nCr(N-K+1, i+1) % mod
  # 各箱にK個の青を入れる組み合わせ、空箱はナシ→K個の青の間(K-1)に仕切りをi個入れる
  blue_comb = nCr(K-1, i) % mod
  print((box_comb * blue_comb) % mod)

### FIXED CODE ###

from math import factorial

def nCr(n, r):
  return factorial(n) // (factorial(n - r) * factorial(r))
  
mod = 10**9 + 7 
 
N,K = map(int,input().split())

for i in range(K):
  if (N - K - i) < 0:
    print(0)
  else:
    # 赤を仕切りと考える、仕切りの左右には箱(N-K+1個)がある、その中のどの箱(i+1個)を用いるか
    box_comb = nCr(N-K+1, i+1) % mod
    # 各箱にK個の青を入れる組み合わせ、空箱はナシ→K個の青の間(K-1)に仕切りをi個入れる
    blue_comb = nCr(K-1, i) % mod
    print((box_comb * blue_comb) % mod)
# encoding: utf-8
H, W, K = map(int, input().split())

raw_route = [0] * W # 0 in unused
possible_route = 0

for i in range(2 ** (W - 1)):
    # check
    i_tmp = i
    last = 0
    for j in range(W - 1):
        if i_tmp % 2 == last == 1: break
        last = i_tmp % 2
        i_tmp = i_tmp // 2
    else:
        # valid drawing
        i_tmp = i
        for j in range(W - 1):
            if i_tmp % 2 == 1: raw_route[j + 1] += 1
            i_tmp = i_tmp // 2
        possible_route += 1

# print("#", raw_route)

DP = [[None] * W for i in range(H)]

def draw(depth, clm):
    # done
    if depth == H + 1: return 1
    # running
    if DP[depth - 1][clm - 1] != None: return DP[depth - 1][clm - 1]
    ## param
    range_min = K - (H - depth)
    range_max = K + (H - depth)
    ## calc ans
    ans = 0
    # print("##", depth, clm, (range_min, range_max))
    ### go straight
    if range_min <= clm <= range_max:
        if clm == 1: ans += (possible_route - raw_route[clm]) * draw(depth + 1, clm)
        elif clm == W: ans += (possible_route - raw_route[clm - 1]) * draw(depth + 1, clm)
        else: ans += (possible_route - raw_route[clm - 1] - raw_route[clm]) * draw(depth + 1, clm)
    ### go left
    if range_min <= clm - 1 and 1 <= clm - 1: ans += raw_route[clm - 1] * draw(depth + 1, clm - 1)
    ### go right
    if clm + 1 <= range_max and clm + 1 <= W: ans += raw_route[clm] * draw(depth + 1, clm + 1)
    ## end
    if DP[depth - 1][clm - 1] == None: DP[depth - 1][clm - 1] = ans % (10 ** 9 + 7)
    return ans % (10 ** 9 + 7)

print(draw(1, 1))


### FIXED CODE ###

# encoding: utf-8
H, W, K = map(int, input().split())

raw_route = [0] * W # 0 in unused
possible_route = 0

for i in range(2 ** (W - 1)):
    # check
    i_tmp = i
    last = 0
    for j in range(W - 1):
        if i_tmp % 2 == last == 1: break
        last = i_tmp % 2
        i_tmp = i_tmp // 2
    else:
        # valid drawing
        i_tmp = i
        for j in range(W - 1):
            if i_tmp % 2 == 1: raw_route[j + 1] += 1
            i_tmp = i_tmp // 2
        possible_route += 1

# print("#", raw_route)

DP = [[None] * W for i in range(H)]

def draw(depth, clm):
    # done
    if depth == H + 1: return 1
    # running
    if DP[depth - 1][clm - 1] != None: return DP[depth - 1][clm - 1]
    ## param
    range_min = K - (H - depth)
    range_max = K + (H - depth)
    ## calc ans
    ans = 0
    # print("##", depth, clm, (range_min, range_max))
    ### go straight
    if range_min <= clm <= range_max:
        coeff = possible_route
        if clm > 1: coeff -= raw_route[clm - 1]
        if clm < W: coeff -= raw_route[clm]
        ans += coeff * draw(depth + 1, clm)
    ### go left
    if range_min <= clm - 1 and 1 <= clm - 1: ans += raw_route[clm - 1] * draw(depth + 1, clm - 1)
    ### go right
    if clm + 1 <= range_max and clm + 1 <= W: ans += raw_route[clm] * draw(depth + 1, clm + 1)
    ## end
    if DP[depth - 1][clm - 1] == None: DP[depth - 1][clm - 1] = ans % (10 ** 9 + 7)
    return ans % (10 ** 9 + 7)

print(draw(1, 1))
x, y = map(int, input().split())
x = (a+b)*2
y = a*b

print(y, x)


### FIXED CODE ###

a, b = map(int, input().split())
x = a*b
y = (a+b)*2

print(x, y)
import math

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

x /= a  # focus on the rectangle a * b

if a * b / 2 > x:
    c = 2 * x / b
    answer = math.degrees(math.atan2(b / c))
    print(answer)
else:
    rest = a * b - x
    c = 2 * rest / a
    answer = math.degrees(math.atan2(c / a))
    print(answer)

### FIXED CODE ###

import math

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

x /= a  # focus on the rectangle a * b

if a * b / 2 > x:
    c = 2 * x / b
    answer = math.degrees(math.atan(b / c))
    print(answer)
else:
    rest = a * b - x
    c = 2 * rest / a
    answer = math.degrees(math.atan(c / a))
    print(answer)
def main():
    n,k=map(int,input().split())
    A = map(int,input().split())

    def prod(iterables):
        res = None
        for element in iterables:
            tmp = 1
            for e in element:
                tmp *= e
            if res is None or tmp > res:
                res = tmp
        return res
    
    pos, neg = [], []
    for a in A:
        if a >= 0:
            pos.append(a)
        else:
            neg.append(a)

    pos_n, neg_n = len(pos), len(neg)
    pos, neg

    ans = None

    for i in range(neg_n):
        if k-i > pos_n:
            continue
        tmp = prod(permutations(neg, i)) * prod(permutations(pos, k-i)) % (10**9+7)
        if ans is None or tmp > ans:
            ans = tmp
    print(ans)
main()

### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    n,k = map(int, input().split())
    A = sorted(map(int, input().split()))
    mod = 10**9 + 7
    ans, sign = 1, 1

    l, r = 0, n-1

    if k%2:
        ans = A[r]
        r-=1
        k-=1
        if ans < 0:
            sign = -1
    while k:
        x = A[l]*A[l+1]
        y = A[r]*A[r-1]

        if x*sign > y*sign:
            ans = x%mod * ans%mod
            l+=2
        else:
            ans = y%mod * ans%mod
            r-=2
        k-=2
    print((ans+mod)%mod)
main()
a[0]=int(input())
a[1]=int(input())
a[2]=int(input())
a[3]=int(input())
a[4]=int(input())
k=int(input())
for i in range(5):
  for j in range(i+1,5):
    if a[j]-a[i]>k :
      print(":(")
      sys.exit()
print("Yay!")

### FIXED CODE ###

import sys
a=[0]*5
a[0]=int(input())
a[1]=int(input())
a[2]=int(input())
a[3]=int(input())
a[4]=int(input())
k=int(input())
for i in range(5):
  for j in range(i+1,5):
    if a[j]-a[i]>k :
      print(":(")
      sys.exit()
print("Yay!")
from sys import stdin
#import numpy as np

readline = stdin.readline

N, Q = map(int, readline().split())
C = list(map(int, readline().split()))
S = [list(map(int, readline().split())) for _ in range(Q)]

def main(N, Q, C, S):    
  # Binary Indexed Tree 
  # https://juppy.hatenablog.com/entry/2018/11/17/%E8%9F%BB%E6%9C%AC_python_Binary_Indexed_Tree_%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0
  b = [0 for _ in range(N+1)]
  def BIT_query(idx): #idxまでの和(1からスタート)
    res_sum = 0
    while idx > 0:
      res_sum += b[idx]
      idx -= idx&(-idx) #一番下の位を減らす（例：13=1011 → 1010 → 1000） 
    return res_sum
  def BIT_update(idx,x): #idxをx増やした時
    while idx <= N:
      b[idx] += x
      idx += idx&(-idx) #一番下の位を繰り上げる（例：13=1011 → 1100 → 10000 ※N=16のとき） 
    return

  loc = [0 for _ in range(N)] #各種類の玉のうちの最右端の所在地
  S = [[S[i][1], S[i][0], i] for i in range(Q)] #クエリ
  S.sort() #区間の右端でソート
  #S = np.array(S, dtype = np.int64)
  #print(S)
  ans = [0 for _ in range(N)]
  k = 0
  for j in range(N):
    if loc[C[j]-1] > 0: #玉の更新
      BIT_update(loc[C[j]-1], -1)
    loc[C[j]-1] = j+1
    BIT_update(j+1, 1)  
    
    if S[k][0] == j+1:
      t = BIT_query(j+1)
    while k < len(S) and S[k][0] == j+1: #クエリへの返答
      ans[S[k][2]] = t - BIT_query(S[k][1]-1)
      k += 1
    if k == len(S):
      break
  return ans

ans = main(N, Q, C, S)
for a in ans:
  print(int(a))

### FIXED CODE ###

from sys import stdin
#import numpy as np

readline = stdin.readline

N, Q = map(int, readline().split()) 
C = list(map(int, readline().split())) 
S = [list(map(int, readline().split())) for _ in range(Q)] 
#print(S)
def main(N, Q, C, S):    
  # Binary Indexed Tree 
  # https://juppy.hatenablog.com/entry/2018/11/17/%E8%9F%BB%E6%9C%AC_python_Binary_Indexed_Tree_%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0
  b = [0 for _ in range(N+1)]
  def BIT_query(idx): #idxまでの和(1からスタート)
    res_sum = 0
    while idx > 0:
      res_sum += b[idx]
      idx -= idx&(-idx) #一番下の位を減らす（例：13=1011 → 1010 → 1000） 
    return res_sum
  def BIT_update(idx,x): #idxをx増やした時
    while idx <= N:
      b[idx] += x
      idx += idx&(-idx) #一番下の位を繰り上げる（例：13=1011 → 1100 → 10000 ※N=16のとき） 
    return

  loc = [0 for _ in range(N)] #各種類の玉のうちの最右端の所在地
  S = [(S[i], i) for i in range(Q)] #クエリ
  S.sort(key = lambda s: s[0][1]) #区間の右端でソート
  #S = np.array(S, dtype = np.int64)
  #print(S)
  ans = [0 for _ in range(Q)]
  k = 0
  for j in range(N):
    if loc[C[j]-1] > 0: #玉の更新
      BIT_update(loc[C[j]-1], -1)
    loc[C[j]-1] = j+1
    BIT_update(j+1, 1)  
    
    if S[k][0][1] == j+1:
      t = BIT_query(j+1)
    while k < len(S) and S[k][0][1] == j+1: #クエリへの返答
      ans[S[k][1]] = t - BIT_query(S[k][0][0]-1)
      k += 1
    if k == len(S):
      break
  return ans

ans = main(N, Q, C, S)
print(*ans, sep='\n')
A, B, C, D = map(int, input().split())
import math
l=C*D//math.gcd(C,D)
underB = B- (B//C+B//D-B//l)
underA = (A-1)- ((A-1)//C+(A-1)//D-(A-1)//l)
#print(underB, underA)
print(underB-underA)

### FIXED CODE ###

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

l=C*D//fractions.gcd(C,D)
underB = B- (B//C+B//D-B//l)
underA = (A-1)- ((A-1)//C+(A-1)//D-(A-1)//l)
#print(underB, underA)
print(underB-underA)
print(int(input()) ***3)

### FIXED CODE ###

s = int(input())
print(s**3)
n, m = map(int,input().split())
lst = []
for _ in range(m):
    lst.append(list(map(int,input().split())))

number = [[] for _ in range(n)]
for v in lst:
    keta,num = v[0]-1,v[1]
    if not number[keta]:
        number[keta] = num
    else:
        if number[keta] != num:
            print(-1)
            exit()

if number[0] == 0:
    print(-1)
    exit()

if not number[0]:
    number[0] = 1

for i in range(m):
    if not number[i]:
        number[i] = 0

for i in  number:
    print(i,end='')
print()

### FIXED CODE ###

n, m = map(int,input().split())
lst = []
for _ in range(m):
    lst.append(list(map(int,input().split())))

number = [[] for _ in range(n)]
for v in lst:
    keta,num = v[0]-1,v[1]
    if number[keta] == []:
        number[keta] = num

    if number[keta] != num:
        print(-1)
        exit()

if n == 1:
    if not number[0]:
        print(0)
    else:
        print(''.join([str(i) for i in number]))
elif n == 2:
    if number[0] == 0:
        print(-1)
        exit()
    else:
        if not number[0]:
            number[0] = 1
        if not number[1]:
            number[1] = 0
        print(''.join([str(i) for i in number]))
else:
    if number[0] == 0:
        print(-1)
        exit()
    else:
        if not number[0]:
            number[0] = 1
        if not number[1]:
            number[1] = 0
        if not number[2]:
            number[2] = 0
        print(''.join([str(i) for i in number]))
n = int(input())
adj = [[i,0] for i in range(n+1) ]
adj_path = []
for _ in range(n-1):
    a,b = map(int,input().split())
    adj_path.append([a,b])
    adj[a][1] += 1
    adj[b][1] += 1
c_list = sorted(list(map(int,input().split())))
out = [0 for i in range(n+1)]
if len(adj_path) == 0:
    print(0)
    print(" ")
else:
    for i,[name,rank] in enumerate(sorted(adj,key=lambda x:x[1])):
        if name != 0:
            out[name] = c_list[i]
    score = 0
    for a,b in adj_path:
        score += min(out[a],out[b])
    print(score)
    print(" ".join(str(x) for x in out[1:]))

### FIXED CODE ###

n = int(input())
adj_path = [[] for _ in range(n)]
paths = []
for _ in range(n-1):
    a,b = map(int,input().split())
    paths.append([a,b])
    adj_path[a-1].append(b-1)
    adj_path[b-1].append(a-1)
c_list = sorted(list(map(int,input().split())),reverse=True)
out = [0 for i in range(n)]
que = [[0,adj_path[0]]]
visited = []
cnt = 0
while(que):
    node_num,children = que.pop(0)
    visited.append(node_num)
    out[node_num] = c_list[cnt]
    cnt += 1
    for child in children:
        if child not in visited:
            que.append([child,adj_path[child]])
score = 0
for path in paths:
    a,b = path
    score += min(out[a-1],out[b-1])
print(score)
print(" ".join(str(x) for x in out))
H, W = map(int, input().split())
As = [list(map(int, input().split())) for _ in range(H)]

before_A = None
history = []
for h, row in enumerate(As):
    it = enumerate(row)
    if h % 2 == 0:
        it = reversed(list(it))
    for w, A in enumerate(row):
        if A % 2 == 0:
            if before_A is not None:
                path.append(h, w)

        else:
            if before_A is None:
                before_A = (h, w)
                path = [(h, w)]
            else:
                path.append((h, w))
                history.append(path[:])
                before_A = None

ans = []
for path in history:
    for i in range(len(path) - 1):
        ans.append( (path[i], path[i+1]) )

print(len(ans))
for (a, b), (c, d) in ans:
    print(a+1, b+1, c+1, d+1, sep = ' ')


    

### FIXED CODE ###

H, W = map(int, input().split())
As = [list(map(int, input().split())) for _ in range(H)]

before_A = None
history = []
for h, row in enumerate(As):
    it = enumerate(row)
    if h % 2 == 0:
        it = reversed(list(it))
    for w, A in it:
        if A % 2 == 0:
            if before_A is not None:
                path.append((h, w))

        else:
            if before_A is None:
                before_A = (h, w)
                path = [(h, w)]
            else:
                path.append((h, w))
                history.append(path[:])
                before_A = None

ans = []
for path in history:
    for i in range(len(path) - 1):
        ans.append( (path[i], path[i+1]) )

print(len(ans))
for (a, b), (c, d) in ans:
    print(a+1, b+1, c+1, d+1, sep = ' ')
import math
from functools import reduce


def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def my_round(val, digit=0):
    p = 10 ** digit
    return (val * p * 2 + 1) // 2 / p


n, m = list(map(int, input().split()))
a_pr = [i // 2 for i in list(map(int, input().split()))]
lcm_ = lcm_list(a_pr)
res, div2 = 0, None
for ai in a_pr:
    cnt = 0
    while a % 2 == 0:
        a //= 2
        cnt += 1
    if div2 is None:
        div2 = cnt
    elif cnt != div2:
        print(0)
        exit()

print(int(my_round(m // lcm_ / 2)))


### FIXED CODE ###

import fractions
import math
n, m = list(map(int, input().split()))
a = sorted(list(map(int, input().split())))
a = [int(i/2) for i in a]
num_gcd = a[0]
for i in range(1, n):
    num_gcd = num_gcd * a[i] // fractions.gcd(num_gcd, a[i])
flag = False
c = 0
p = a[0]
while True:
    if p % 2 != 0:
        break
    p /= 2
    c += 1
for i in range(1, n):
    if a[i] % (2 ** c) == 0 and (a[i] // (2 ** c)) % 2 != 0:
        pass
    else:
        flag = True
if flag:
    print(0)
else:
    print(math.ceil((m // num_gcd) / 2))
cnt = 0
s = input().lower()
while 1:
    W = input().lower().split()
    if W == "END_OF_TEXT":
        break
    elif W == s:
        cnt += 1
print(cnt)

### FIXED CODE ###

cnt = 0
s = input().lower()
while 1:
    line = input()
    if line == "END_OF_TEXT":
        break
    for w in line.lower().split():
        if w == s:
            cnt+=1
print(cnt)
import sys
input = sys.stdin.readline
n,m= map(int,input().split())

B = []
C = [0]*n
ans = 0
pna = 0
for i in range(m):
    A = list(map(str,input().split()))
    if A[0] not in B:
        if A[1]=="AC" :
            B.append(A[0])
            ans += 1
            pna += C[int(A[0])-1]
    	else:
      	  C[int(A[0])-1] += 1 
print(ans,pna)

### FIXED CODE ###

import sys
input = sys.stdin.readline
n,m= map(int,input().split())
A = [ int(input()) for _ in range(n)]
a=sorted(A)
ans = 10 **10
for i in range(n-m+1):
    ans = min(abs(a[i+m-1] - a[i]),ans)
print(ans)
import math

N,M = (int(i) for i in input().split())
a = [0] * M
mod = 1000000007
for i in range(M):
    a[i] = int(input())

def calc(f,t):
    tmp = t - f
    i = 1
    ans = 1
    if tmp == 1:
        return 1
    if tmp == 0:
        return 1
    while(tmp >= 2*i):
        ans += math.factorial(tmp - i) // math.factorial(i) // math.factorial(tmp - 2*i)
        i += 1
    return ans

flag = 0
A = 1
A *= calc(0,a[0]-1)

for i in range(M-1):
    if a[i] + 1 == a[i+1]:
        flag = 1
        break
    A *= calc(a[i]+1,a[i+1]-1)
    A %= mod

A *= calc(a[M-1]+1,N)
A %= mod

if flag == 1:
    print(0)
elif M == 0:
    print(calc(0,N))
else:
    print(A)


### FIXED CODE ###


N,M = (int(i) for i in input().split())
a = [0] * M
mod = 1000000007
for i in range(M):
    a[i] = int(input())
a.append(100000000)
flag = 0
for i in range(M-1):
    if a[i] + 1 == a[i+1]:
        flag = 1
        break

dp = [1] * (N + 1)
tmp = 0

for i in range(N-1):
    if i+1 == a[tmp]:
        dp[i+2] = dp[i]
    elif i == a[tmp]:
        dp[i+2] = dp[i+1]
        tmp += 1
    else:
        dp[i+2] = (dp[i+1] + dp[i]) % mod

if flag == 1:
    print(0)
else:
    print(dp[N])
def composite(d,n,s):
    for a in (2,3,5,7):
        maybe_prime = False
        if pow(a,d,n) == 1:
            maybe_prime = True
            continue
        for i in range(s):
            if pow(a, 2**i * d, n) == n-1:
                maybe_prime = True
                break
        return not probably_prime
    return False

def is_prime(n):
    if n==2:
        return True
    elif n%2==0:
        return False
    else:
        d,s = n-1, 0
        while not d%2:
            d,s = d>>1,s+1
        return not composite(d,n,s)
r = []
n = int(input())
for i in range(n):
  n = int(input())
  if is_prime(n):
      if n not in r:
          r.append(n)

print(len(r))

### FIXED CODE ###

def composite(d,n,s):
    for a in (2,3,5,7):
        p = False
        if pow(a,d,n) == 1:
            continue
        for i in range(s):
            if pow(a, 2**i * d, n) == n-1:
                p = True
                break
        if not p:
            return True
    return False
  
def is_prime(n):
    if n in (2,3,5,7):
        return True
    else:
        d,s = n-1, 0
        while not d%2:
            d,s = d>>1,s+1
        return not composite(d,n,s)
r = []
n = int(input())
for i in range(n):
  n = int(input())
  if is_prime(n):
    r.append(n)
  
print(len(r))
n=int(input())
rowdata=[int(i) for i in input().split()]
rowdata.sort()

#nが偶数の時
if n%2==0:
    check=[]
    for i in range(1,n,2):
        check.append(i)
        check.append(i)
    if check==rowdata:
        print(int(2**(n/2)))
    else:
        print(0)
else:
    check=[]
    if n==1:
        check=[0]
    else:
        for i in range(0,n,2):
            if i==0:
                check.append(i)
            else:
                check.append(i)
                check.append(i)
    if check==rowdata:
        print(int(2**((n-1)/2)))
    else:
        print(0)

### FIXED CODE ###

a,op,b=input().split()
a=int(a)
b=int(b)
if op=="+":
    print(a+b)
else:
    print(a-b)
import numpy as np
from sys import stdin
sys.setrecursionlimit(10**6) 

def main(args):
    a = args[0]
    b = args[1]
    if 6 <= a and a <= 12:
        v = b//2
    elif a <= 5:
        v = 0
    else:
        v = b
    print(v)

main([stdin.readline().rstrip().split()])

### FIXED CODE ###

import numpy as np
from sys import stdin
#sys.setrecursionlimit(10**6) 

def main():
    a, b = [int(x) for x in stdin.readline().rstrip().split()]
    if 6 <= a and a <= 12:
        v = b//2
    elif a <= 5:
        v = 0
    else:
        v = b
    print(v)

if __name__ == "__main__":
    main()
N, T = map(int, input().split())
m=1001
for i in range(N):
    c,t=map(int,input().split())
    if t<=T:m=min(m,c)
print("TLE" if m==1001 else m

### FIXED CODE ###

N, T = map(int, input().split())
m = 1001
for i in range(N):
    c,t = map(int,input().split())
    if t <= T: m = min(m,c)
print("TLE" if m == 1001 else m)
N, M, Q = map(int, input().split())
table = [[0 for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
    l, r = map(int, input().split())
    table[l][r] += 1
cum_sum2 = [[0 for _ in range(N+1)] for _ in range(N+1)]
for i, j in product(range(1, N+1), repeat=2):
    cum_sum2[i][j] += table[i][j] + cum_sum2[i-1][j] + cum_sum2[i][j-1] - cum_sum2[i-1][j-1]
for _ in range(Q):
    p, q = map(int, input().split())
    ans = cum_sum2[q][q] - cum_sum2[p-1][q] - cum_sum2[q][p-1] + cum_sum2[p-1][p-1]
    print(ans)

### FIXED CODE ###

from itertools import product

N, M, Q = map(int, input().split())
table = [[0 for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
    l, r = map(int, input().split())
    table[l][r] += 1
cum_sum2 = [[0 for _ in range(N+1)] for _ in range(N+1)]
for i, j in product(range(1, N+1), repeat=2):
    cum_sum2[i][j] += table[i][j] + cum_sum2[i-1][j] + cum_sum2[i][j-1] - cum_sum2[i-1][j-1]
for _ in range(Q):
    p, q = map(int, input().split())
    ans = cum_sum2[q][q] - cum_sum2[p-1][q] - cum_sum2[q][p-1] + cum_sum2[p-1][p-1]
    print(ans)
N = int(input())
if N%2 == 1: print("No")
else:
  	n=N//2
    S = input()
    if S[:n]==s[n:] :print("Yes")
    else:print("No")


### FIXED CODE ###

N = int(input())
S = input()
if N%2 == 1: print("No")
else:
    n=int(N/2)
    if S[:n]==S[n:] :print("Yes")
    else:print("No")