Harryxun/stf_run huggingface dataset:
a,b,c=int(input()).split()
d,e,f=int(input()).split()
g,h,i=int(input()).split()

x=[[a,b,c],[d,e,f],[g,h,i]]
while True:
    b_i=int(input())
    if b_i in x:
        x[b_i]=0
if x[:,0]==0:
    print(“Yes”)
if x[:,1]==0:
    print(“Yes”)
if x[:,2]==0:
    print(“Yes”)
if x[0,:]==0:
    print(“Yes”)
if x[1,:]==0:
    print(“Yes”)
if x[2:,]==0:
    print(“Yes”)
if x[0,0] and x[1,1] and x[2,2]==0:
    print(“Yes”)
if x[0,2] and x[1,1] and x[2,0]==0:
    print(“Yes”)
else:
    print(“No”)

### FIXED CODE ###

import numpy as np
N_1=list(map(int, input().split()))
N_2=list(map(int, input().split()))
N_3=list(map(int, input().split()))
N=int(input())
a=[int(input()) for i in range(N)]

n=np.array([N_1,N_2,N_3])

for a_n in a:
    if a_n in n:
        n[n==a_n]=0
    else:
        pass
i=0
    
if np.all(n[0:,0]==0)==True:
    i=+1
    
elif np.all(n[0:,1]==0)==True:
    i+=1
    
elif np.all(n[0:,2]==0)==True:
    i+=1
    
elif np.all(n[0,0:]==0)==True:
    i+=1
    
elif np.all(n[1,0:]==0)==True:
    i+=1

elif np.all(n[2,0:]==0)==True:
    i+=1

elif n[0,0]==0 and n[1,1]==0  and n[2,2] ==0:
    i+=1
    
elif n[0,2]==0 and n[1,1]==0 and n[2,0] ==0:
    i+=1
    
if i>0:
    print("Yes")
else:
    print("No")
x=raw_input();
y=raw_input();
z=raw_input();
l=[];
l.append(x);
l.append(y);
l.append(z);
l.sort();
for x in l:
    print x,

### FIXED CODE ###

x=raw_input();
l=x.split();
l.sort();
for x in l:
    print x,
N = int(input())
D = list(map(int, input().split()))

diff = [0]*13
D.sort()
for i in range(N):
    diff[D[i]] += 1

if diff[0] > 0:
    print(0)
    exit(0)
else:
    diff2 = [diff[12 - i] for i in range(1, N-1)]

for i in range(13):
    if diff[i] > 2:
        print(0)
        exit(0)

ans = [0]
ans = [D[i]
       for i in range(N) if i % 2 == 0] + [24 - D[i] for i in reversed(range(N)) if i % 2 == 1]

ans = [abs(ans[i+1] - ans[i]) for i in range(N-1)]

print(min(ans))


### FIXED CODE ###

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


D.sort()
ans = [0]
ans = [D[i]
       for i in range(N) if i % 2 == 0] + [24 - D[i] for i in reversed(range(N)) if i % 2 == 1]

ans = [0] + ans + [0]

ans = [abs(ans[i+1] - ans[i]) for i in range(N+1)]

print(min(ans))
_, q = input().split()
s = list(input())
qs = [list(map(int, input().split())) for _ in range(int(q))]

def get_num_AC(ccond, s, count):
    if s == []:
        return count
    if ccond:
        if s.pop() == 'A':
            return get_num_AC(False, s, count+1)
        else:
            if s == []:
                return count
            else:
                return get_num_AC(s.pop() == 'C', s, count)
    return get_num_AC(s.pop() == 'C', s, count)

def get_substr(s, smaller, larger):
    s1 = s[smaller-1:larger]
    return s1

for smaller, larger in qs:
    substr = get_substr(s, smaller, larger)
    count = get_num_AC(False, substr, 0)
    print(count)


### FIXED CODE ###

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

s = input()

count = [0] * n

for i in range(1, n):
    if s[i-1] == 'A' and s[i] == 'C':
        count[i] += 1

from itertools import accumulate

accum = list(accumulate(count))

for _ in range(q):
    l, r = map(int, input().split())
    print(accum[r-1] - accum[l-1])
N=int(input())
LA=list(map(int,input().split()))
ans=[]

from math import gcd
from functools import reduce
def func(item):
    return reduce(gcd, item)

for n in range(N):
    L=LA[:n]+LA[n+1:]
    ans.append(func(L))

print(max(ans))

### FIXED CODE ###

N=int(input())
LA=list(map(int,input().split()))
ans=[]

def gcd(m,n):
    if m==0 or n==0:
        return m+n
    while n:
        m,n=n,m%n
    return m

La=[0]
Lb=[0]

for n in range(N-1):
    La.append(gcd(La[n],LA[n]))
    Lb.append(gcd(Lb[n],LA[-(n+1)]))

for n in range(N):
    ans.append(gcd(La[n],Lb[-(n+1)]))
        
print(max(ans))
import sys

stdin = sys.stdin


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


def naa(N): return [na() for _ in range(N)]


def ns(): return stdin.readline().rstrip()  # ignore trailing spaces

# 大きい数用


mod = 10**9 + 7
N = 10 ** 6  # 出力の制限
inverse = [0, 1]  # 逆元テーブル計算用テーブル

for i in range(2, N + 1):
    inverse.append((-inverse[mod % i] * (mod // i)) % mod)


K = ni()
S = ns()
s_len = len(S)
mod = 10 ** 9 + 7
ans = 0

total = K + s_len

rui = 1

cmb = 1

for i in range(total, s_len - 1, -1):
    ans = (ans + cmb * rui) % mod
    # print(ans)
    rui = (rui * 25) % mod
    cmb = (cmb * i * inverse[total - i + 1]) % mod
print(ans)



### FIXED CODE ###

import sys

stdin = sys.stdin


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


def naa(N): return [na() for _ in range(N)]


def ns(): return stdin.readline().rstrip()  # ignore trailing spaces

# 大きい数用


mod = 10**9 + 7
N = 10 ** 6 + 1  # 出力の制限
inverse = [0, 1]  # 逆元テーブル計算用テーブル

for i in range(2, N + 1):
    inverse.append((-inverse[mod % i] * (mod // i)) % mod)

K = ni()
S = ns()
s_len = len(S)
mod = 10 ** 9 + 7
ans = 0

total = K + s_len

rui = 1

cmb = 1

for i in range(total, s_len - 1, -1):
    # print(total - i + 1)
    ans = (ans + cmb * rui) % mod
    # print(ans)
    rui = (rui * 25) % mod
    cmb = (cmb * i * inverse[total - i + 1]) % mod
print(ans)
m=0
def merge(a,left,mid,right):
    n1=mid-left
    n2=right-mid
    el=list(range(0,n1+1))
    ar=list(range(0,n2+1))
    for i in range(n1):
        el[i]=a[left+i]
    for i in range(n2):
        ar[i]=a[mid+i]
    el[n1]=20*10000
    ar[n2]=20*10000
    i=0
    j=0
    for k in range(left,right):
        global m
        m+=1
        if(el[i] <= ar[j]):
            a[k] = el[i]
            i=i+1
        else:
            a[k]=ar[j]
            j=j+1

def merge_sort(a,left,right):
    if(left+1<right):
        mid=(left+right)//2
        merge_sort(a,left,mid)
        merge_sort(a,mid,right)
        merge(a,left,mid,right)

a=[]
n=int(input())
s=input()
a=list(map(int,s.split()))
merge_sort(a,0,n)
a=map(str,a)
print(" ".join(list(a)))
print(m)
    

### FIXED CODE ###

m=0
def merge(a,left,mid,right):
    n1=mid-left
    n2=right-mid
    el=a[left:mid]
    ar=a[mid:right]
    el.append(float("inf"))
    ar.append(float("inf"))
    i=0
    j=0
    for k in range(left,right):
        global m
        m+=1
        if(el[i] <= ar[j]):
            a[k] = el[i]
            i=i+1
        else:
            a[k]=ar[j]
            j=j+1

def merge_sort(a,left,right):
    if(left+1<right):
        mid=(left+right)//2
        merge_sort(a,left,mid)
        merge_sort(a,mid,right)
        merge(a,left,mid,right)
    else:
        if(a[left]>a[right-1]):
            a[left],a[right-1]=a[right],a[left]



n=int(input())
s=input()
a=list(map(int,s.split()))
merge_sort(a,0,n)
a=map(str,a)
print(" ".join(list(a)))
print(m)
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
xya.sort(a)
w1=w
h1=h
for i in range(n):
    if xya[i][2]==1:w1=w-int(xya[i][0])
    elif xya[i][2]==2:w1-=(w-int(xya[i][0])
    elif xya[i][2]==3:h1=h-int(xya[i][1])
    elif xya[i][2]==4:h1-=(h-int(xya)[i][1])
    else:pass
if w1>0 and h1>0:print(w1*h1)
else:print(0)


### FIXED CODE ###

w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
wl,wr,hu,ht=0,w,0,h
for i in range(n):
    if xya[i][2]==1:
        wl=max(wl,int(xya[i][0]))
    elif xya[i][2]==2:
        wr=min(wr,int(xya[i][0]))
    elif xya[i][2]==3:
        hu=max(hu,int(xya[i][1]))
    elif xya[i][2]==4:
        ht=min(ht,int(xya[i][1]))
    else:pass
if wl>wr or hu>ht:print(0)
else:print((wr-wl)*(ht-hu))
import math
N = int(input())
print(math.gcd(2,N))

### FIXED CODE ###

import fractions
N = int(input())

print(2*N if N%2==1 else N)
N, M= int(input().join(' '))

items = [i for i in input().join(' ')]
items.sort()
total = sum(items)

flag = 1
for i in range(M):
  if 1 // (4 * M) >= items[i]:
    pass
  else:
    flag = 0
if not flag:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

items = [int(i) for i in input().split()]
items.sort(reverse=True)
total = sum(items)

flag = 1
for i in range(M):
  if total / (4 * M) <= items[i]:
    pass
  else:
    flag = 0
if flag:
  print('Yes')
else:
  print('No')
import itertools
import numpy as np


def _run(H, W, K, C):
    input = np.zeros([H, W], dtype=np.int8)
    for h in range(H):
        for w in range(W):
            if C[h][w] == "#":
                input[h, w] = 1

    count = 0
    for r in itertools.product(*[[0, 1] for _ in range(H + W)]):
        copy_input = input.copy()
        for h in range(H):
            if r[h] == 1:
                copy_input[h] = 0
        for w in range(W):
            if r[H + w] == 1:
                copy_input[:, w] = 0

        if np.sum(copy_input) == K:
            count += 1
    print(count)


def _main():
    H, W, K = map(int, input().split())
    C = [list(map(int, input().split())) for _ in range(H)]
    _run(H, W, K, C)


if __name__ == "__main__":
    _main()


### FIXED CODE ###

import itertools

import numpy as np


def _run(H, W, K, C):
    input = np.zeros([H, W], dtype=np.int8)
    for h in range(H):
        for w in range(W):
            if C[h][w] == "#":
                input[h, w] = 1

    count = 0
    for r in itertools.product(*[[0, 1] for _ in range(H + W)]):
        copy_input = input.copy()
        for h in range(H):
            if r[h] == 1:
                copy_input[h] = 0
        for w in range(W):
            if r[H + w] == 1:
                copy_input[:, w] = 0

        if np.sum(copy_input) == K:
            count += 1
    print(count)


def _main():
    H, W, K = map(int, input().split())
    C = [str(input()) for _ in range(H)]
    _run(H, W, K, C)


if __name__ == "__main__":
    _main()
import sys

sys.setrecursionlimit(4000)


class Node:
  def __init__(self, tpl):
    self.id = tpl[0] + 1
    self.c = int(tpl[1])
    self.relations = []

  def add_relation(self, node):
    self.relations.append(node)


def prepare_nodes(n):
  node_dict = {
    node.id: node
    for node in map(Node, enumerate(input().split()))
  }

  for _ in range(n - 1):
    a, b = map(int, input().split())
    node_dict[a].add_relation(node_dict[b])
    node_dict[b].add_relation(node_dict[a])

  return node_dict


def cal(k, node, prev_id = None):
  other_color_nodes = list(filter(
    lambda node: node.c != k and node.id != prev_id,
    node.relations
  ))
  num = len(other_color_nodes)

  for next_node in other_color_nodes:
    num += cal(k, next_node, node.id)
  return num


def main():
  n = int(input())
  node_dict = prepare_nodes(n)
  comb_num = int(n * (n - 1) / 2) + n

  for k in range(1, n + 1):
    other_color_nodes = tuple(filter(
      lambda node: node.c != k, node_dict.values()
    ))
    num = len(other_color_nodes)
    if num == n:
      print(0)
      continue

    num *= 2
    for node in other_color_nodes:
      num += cal(k, node)

    print(comb_num - int(num / 2))


main()


### FIXED CODE ###

import sys
import itertools

sys.setrecursionlimit(3 * 10**5)


class Node:
  def __init__(self, color):
    self.color = int(color) - 1
    self.children = []

  def add_child(self, node):
    self.children.append(node)

  @staticmethod
  def prepare_nodes(n):
    nodes = tuple(map(Node, input().split()))
    for _ in range(n - 1):
      a, b = map(lambda x: int(x) - 1, input().split())
      nodes[a].add_child(nodes[b])
      nodes[b].add_child(nodes[a])

    return nodes


def main():
  n = int(input())
  nodes = Node.prepare_nodes(n)

  dp = [0 for _ in range(n)]
  ans_list = [n*(n + 1) // 2 for _ in range(n)]

  def update_ans(s, color):
    ans_list[color] -= (s + dp[color]) * (s + dp[color] + 1) // 2

  def dfs(s, node, parent):
    color = node.color
    pre_s = s + dp[color]
    for child in node.children:
      if child == parent: continue

      dp[color] = -s
      s = dfs(s, child, node)
      update_ans(s, color)

    s += 1
    dp[color] = pre_s - s

    return s

  s = dfs(0, nodes[0], Node(-1))

  for i in range(n):
    update_ans(s, i)
    print(ans_list[i])


main()
def factrial(n):
    if n == 1:
        return 1
    else:
        return n * factrial(n - 1)

def combination(n, r):
    return factrial(n) // (factrial(n - r) * factrial(r))

x, y = map(int, input().split())
if (2 * x - y) % 3 != 0 or (2 * y - x) % 3 != 0:
    print(0)
elif 2 * y - x < 0 or 2 * x - y < 0:
    print(0)
else:
    vertical = (2 * y - x) // 3
    horizontal = (2 * x - y) // 3
    total = vertical + horizontal
    print(combination(total, horizontal))

### FIXED CODE ###

def multiple_of_n(x, y, n=3):
    return (x - y) % n == 0

def combination(g1, g2, inverse, n, r, mod):
    if (r < 0 or r > n):
        return 0
    r = min([r, n - r])
    return g1[n] * g2[r] * g2[n - r] % mod

def make_inv(mod, N):
    g1 = [1, 1]
    g2 = [1, 1]
    inverse = [0, 1]
    for i in range(2, N + 1):
        g1.append((g1[-1] * i) % mod)
        inverse.append((- inverse[mod % i] * (mod // i)) % mod)
        g2.append((g2[-1] * inverse[-1]) % mod)
    return g1, g2, inverse

mod = 10 ** 9 + 7

x, y = map(int, input().split())
if multiple_of_n(2 * x, y) and multiple_of_n(2 * y, x):
    vertical = (2 * y - x) // 3
    horizontal = (2 * x - y) // 3
    total = vertical + horizontal
    g1, g2, inverse = make_inv(mod, total)
    print(combination(g1, g2, inverse, total, horizontal, mod))
else:
    print(0)
A,B = map(int,input().split())
a,b = map(int,input().split())

print((H-h)*(W-w))


### FIXED CODE ###

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

print((H-h)*(W-w))
from math import gdc
K=int(input())
ans=0 

for i in range(1,K+1):
  for j in range(1,K+1):
    for l in range(1,K+1):
      ans+= gcd(gcd(l,j),i)

print(ans)

### FIXED CODE ###

from math import gcd
K=int(input())
ans=0 
 
for i in range(1,K+1):
  for j in range(1,K+1):
    for l in range(1,K+1):
      ans+= gcd(gcd(l,j),i)
 
print(ans)
import math

def distance(a, b):
    return float('{:.9}'.format(math.sqrt((b[0] - a[0])**2 + (b[1] - a[1])**2)))

if __name__ == '__main__':
    x1, y1, x2, y2 = map(int, input().split())
    print(distance((x1, y1), (x2, y2)))



### FIXED CODE ###

import math

def distance(a, b):
    dx = abs(a[0]-b[0])
    dy = abs(a[1]-b[1])
    return math.sqrt(dx*dx + dy*dy)

if __name__ == '__main__':
    x1, y1, x2, y2 = map(float, input().split())
    print(distance((x1, y1), (x2, y2)))
N, Q = map(int, input().split())

S = input()

for i in range(Q):
    cnt = 0
    l, r = map(int, input().split())
    T = S[l-1:r]
    for t in list(T):
        if t=="A":
            flag = True
        elif t=="T" and flag:
            cnt += 1
            flag = False
        else:
            flag = False
    print(cnt)








### FIXED CODE ###


N, Q = map(int, input().split())
S = list(input())
lr = []
for i in range(Q):
    l, r = map(int, input().split())
    lr.append([l-1, r-1])
AC = []
pre = None
cnt = 0
for c in S:
    if c == "A":
        pre = "A"
    elif pre == "A" and c == "C":
        cnt += 1
        pre = None
    elif pre == "A":
        pre = None
    AC.append(cnt)
for l, r in lr:
    print(AC[r] - AC[l])
N, M = map(int, input().split())

l = []

for i in range(N):
    l.append(list(map(int, input().split())))

lis = [[] for i in range(N)]

for i in range(N):
    lis[l[i][0] - 1].append(l[i][1])
    lis[l[i][1] - 1].append(l[i][0])

# list = [[0 for c in range(M)] for r in range(N)]
#
# for i in range(M):
#     tmp_n, tmp_m = map(int, input().split())
#     list[tmp_n - 1][tmp_m - 1] = 1
#
#
# def dot(index1, index2):
#     results = [[0 for c in range(M)] for r in range(N)]
#     for (i, j) in zip(index1, zip(*index2)):
#         print(i,j)
#     return results

ends = []
que = []

# def travel(now, nextnodes, visited):
#     ends.append(visited)
#     visited.append(now + 1)
#     for node in nextnodes:
#         if node in visited:
#             continue
#         travel(node - 1, lis[node - 1], visited[:])
#
#
# travel(0, lis[0], [])

que = [[0, lis[0], []]]

while que:
    now, nextnodes, visited = que.pop()
    ends.append(visited)
    visited.append(now + 1)
    for node in nextnodes:
        if node in visited:
            continue
        que.append([node - 1, lis[node - 1], visited[:]])

print(len(list(filter(lambda i: len(i) is 3, ends))))


### FIXED CODE ###

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

l = []

for i in range(M):
    l.append(list(map(lambda x: int(x) - 1, input().split())))

lis = [[] for i in range(N)]

for i in range(M):
    lis[l[i][0]].append(l[i][1])
    lis[l[i][1]].append(l[i][0])


# 隣接行列
# list = [[0 for c in range(M)] for r in range(N)]
#
# for i in range(M):
#     tmp_n, tmp_m = map(int, input().split())
#     list[tmp_n - 1][tmp_m - 1] = 1
#
#
# def dot(index1, index2):
#     results = [[0 for c in range(M)] for r in range(N)]
#     for (i, j) in zip(index1, zip(*index2)):
#         print(i,j)
#     return results



# 再起関数
# def travel(now, nextnodes, visited):
#     ends.append(visited)
#     visited.append(now + 1)
#     for node in nextnodes:
#         if node in visited:
#             continue
#         travel(node - 1, lis[node - 1], visited[:])
#
#
# travel(0, lis[0], [])

que = [[0, lis[0], []]]
ends = []

while que:
    now, nextnodes, visited = que.pop()
    ends.append(visited)
    visited.append(now)
    for node in nextnodes:
        if node in visited:
            continue
        que.append([node, lis[node], visited[:]])

print(len(list(filter(lambda ii: len(ii) is N, ends))))
N = int(input())
max_N = 2 * 10 ** 5

d = [[0] * 10 for _ in range(10)]
for i in range(1,int(n)):
  k = str(i)
  d[int(k[0])][int(k[-1])] += 1

ans = 0
for i in range(10):
    for j in range(10):
        ans += d[i][j] * d[j][i]
print(ans)

### FIXED CODE ###

n = input()
 
d = [ [0] * 10 for _ in range(10) ]
for i in range( 1, int( n ) + 1 ):
  k = str(i)
  d[ int( k[ 0 ])][ int( k[ -1 ])] += 1

ans = 0
for i in range(10):
  for j in range(10):
    ans += d[i][j] * d[j][i]
print(ans)
n = int(input())
s = []
for i in range(n):
  s.append(int(input())
m = max(s)
print(sum(s)-m//2)


### FIXED CODE ###

n = int(input())
p = [int(input()) for i in range(n)]
print(sum(p) - max(p) // 2)
n = int(input())
s = list(input())

if n%2 == 0:
    s1 = set(s[:n//2])
    s2 = set(s[n//2:])
    print(len(s1&s2))
else:
    s1 = set(s[:n//2])
    s2 = set(s[n//2:])
    s3 = set(s[:(n//2)+1])
    s4 = set(s[(n//2)+1:])
  print(max(len(s1&s2),len(s3,s4)))

### FIXED CODE ###

n = int(input())
s = list(input())
l = [0]*n
for i in range(n):
    s1 = set(s[:i:])
    s2 = set(s[i::])
    l[i] = len(s1&s2)
print(max(l))
n = int(input())
mod = 10**9 + 7
cou = 0
pdic = {}
kan = []
for i in range(n):
    a , b = map(int,input().split())
    p = a/b
    q = -b/a
    if pdic.get(q,-1) != -1:
        kan[pdic[q]][1] += 1
    elif pdic.get(p,-1) == -1:
        pdic[p] = cou
        kan.append([1,0])
        cou += 1
    elif pdic.get(p,-1) != -1:
        kan[pdic[p]][0] += 1
        
ans = 1
for i in range(len(kan)):
    if kan[i][1] == 0:
        ans *= pow(2,kan[i][0],mod)
    elif kan[i][1] != 0:
        ans *= (pow(2,kan[i][0],mod) + pow(2,kan[i][1],mod)-1) % mod
    ans %= mod

print(ans-1)

### FIXED CODE ###

import math
n = int(input())
mod = 10**9 + 7
cou = 0
pdic = {}
kan = []
betu = [0,0,0]

for i in range(n):
    a , b = map(int,input().split())
    if a*b != 0:
        g = math.gcd(abs(a),abs(b))
        if a*b > 0:
            m = 1
        elif a*b < 0:
            m = -1
        p = (m*abs(a)//g,abs(b)//g)
        q = ((-m)*abs(b)//g,abs(a)//g)
        if pdic.get(q,-1) != -1:
            kan[pdic[q]][1] += 1
        elif pdic.get(p,-1) == -1:
            pdic[p] = cou
            kan.append([1,0])
            cou += 1
        elif pdic.get(p,-1) != -1:
            kan[pdic[p]][0] += 1
    elif a*b == 0:
        if a == 0 and b == 0:
            betu[2] += 1
        elif a == 0:
            betu[0] += 1
        elif b == 0:
            betu[1] += 1
        
        
ans = 1
for i in range(len(kan)):
    ans *= (pow(2,kan[i][0],mod) + pow(2,kan[i][1],mod) - 1) % mod
    ans %= mod
ans *= (pow(2,betu[0],mod) + pow(2,betu[1],mod) - 1) % mod
print((ans-1+betu[2])%mod)
import numpy as np

N, X, T = map(int, input().split())

for n in range(1:1000):
  if T*n >= np.ceil(N/X):
    break
print(T*n)  

### FIXED CODE ###

import numpy as np

N, X, T = map(int, input().split())

for n in range(1,1000):
    if n>=N/X:
        break
    n+=1

print(T*n)
for i in input():
    i.split()
    a = int(i[i][0])
    b = int(i[i][1])
    temp = a+b
    x = 0
    while temp // (10**x) > 0:
        x += 1
    print(x)

### FIXED CODE ###

import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))
l = []
l= []
while True:
  m,f,r = map(int,input().split())
  if m == f == r == -1:
    break
  else:
    l.append([m,f,r])
for i in l:
  s = ''
  x = i[0] + i[1]
  if i[0] == -1 or i[1] == -1:
    s = 'F'
  elif x >= 80:
    s = 'A'
  elif x >= 65:
    s = 'B':
  elif x >= 50:
    s = 'C':
  elif x >= 30:
    s = 'D'
    if i[2] >= 50:
      s = 'C'
  else:
    s = 'F'
  print(s)

### FIXED CODE ###

def code():
	l = []
	while True:
		m,f,r = map(int,input().split())
		if m == f == r == -1:
			break
		else:
			l.append([m,f,r])
	for i in l:
		s = ''
		x = i[0]+i[1]
		if i[0] == -1 or i[1] == -1:
			s = 'F'
		elif x >= 80:
			s = 'A'
		elif x >= 65:
			s = 'B'
		elif x >= 50:
			s = 'C'
		elif x >= 30:
			s = 'D'
			if i[2] >= 50:
				s = 'C'
		else:
			s = 'F'
		print(s)
code()
a,b,c = map(int,input().split())

lst = [a,b,c]

cnt = len(list( filter(lambda x:x%2==0,lst)))

if(0<cnt):
    print(0)
else:
    lst.sort()

    res = 0
    if(lst[2]%2 == 1):  
        res = lst[0]*lst[1]
    else:
        res = 0

    prin

### FIXED CODE ###


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

lst = [a,b,c]

cnt = len(list( filter(lambda x:x%2==0,lst)))

if(0<cnt):
    print(0)
else:
    lst.sort()

    res = 0
    if(lst[2]%2 == 1):  
        res = lst[0]*lst[1]
    else:
        res = 0

    print(res)
str=input()

a=str[0]
b=str[len(str)]
c=len(str)-2

print(a+c+b)


### FIXED CODE ###

s=input()

a=s[0]
b=s[len(s)-1]
c=len(s)-2

print(a+str(c)+b)
import numpy as np
import sys
input = sys.stdin.readline
mod = 10**9 + 7
n,k = map(int,input().split())
x = np.array([list(map(int,input().split())) for i in range(n)],dtype = np.int64)
# for i in ra
#  list(map(int,input().split())))
ans = np.eye(n,dtype = np.int64)
while k > 0:
    if k&1:
        ans = np.mod(np.dot(ans, x), mod)
        # ans = np.dot(ans, x)
    k = k >> 1
    x = np.mod(np.dot(x,x), mod)
    # x = np.dot(x,x)
res = 0
for i in range(n):
    for j in range(n):
        res += ans[i][j]
        res %= mod
print(res)


### FIXED CODE ###

import sys
input = sys.stdin.readline
mod = 10**9 + 7
n,k = map(int,input().split())
x = [list(map(int,input().split())) for i in range(n)]
ans = [[0]*i +[1]+[0]*(n-i-1) for i in range(n)]

def dot(A,B):
    res = [[0]*n for _ in range(n)]
    for i in range(n):
        for j in range(n):
            for k in range(n):
                res[i][j] += A[i][k]*B[k][j]
                res[i][j] %= mod
    return res

while k > 0:
    if k&1:
        ans = dot(ans, x)
    k = k >> 1
    x = dot(x,x)
res = 0
for i in range(n):
    for j in range(n):
        res += ans[i][j]
        res %= mod
print(res)