Harryxun/stf_run huggingface dataset:
N = int(input())

xyh = []

for i in range(N):
    x,y,h = map(int,input().split())
    xyh.append([x,y,h])

for i in range(101):
    for j in range(101):

        Cx = i
        Cy = j
        ans = True
        flag_h = True

        for x,y,h in xyh:

            if h>0 and flag_h:
                H = h+abs(Cx-x)+abs(Cy-y)
                flag_h = False

            else:
                tmp_h = h+abs(Cx-x)+abs(Cy-y)
                if h>0:
                    if tmp_h != H:
                        ans = False
                        break
                else:
                    if H - abs(Cx-x) -abs(Cy-y) > 0:
                        ans = False
                        break
            
        if ans:
            print(Cx,Cy,H)
            exit() 

### FIXED CODE ###

N = int(input())

xyh = []
not_zero = -100
flag_zero = True

for i in range(N):
    x,y,h = map(int,input().split())
    if h > 0 and flag_zero:
        not_zero = i
        flag_zero = False
    xyh.append([x,y,h])

for i in range(101):
    for j in range(101):

        Cx = i
        Cy = j
        H = xyh[not_zero][2] + abs(Cx-xyh[not_zero][0]) + abs(Cy-xyh[not_zero][1])
        ans = True

        for x,y,h in xyh:
            tmp_h = h+abs(Cx-x)+abs(Cy-y)
            if h>0:
                if tmp_h != H:
                    ans = False
                    break
            else:
                if H - abs(Cx-x) -abs(Cy-y) > 0:
                    ans = False
                    break
            
        if ans:
            print(Cx,Cy,H)
            exit()
def func():

    n = int(input())
    data = []
    for i in range(n):
        data.append(list(map(int,input().split())))




    for cx in range(101):
        for cy in range(101):
            for line in data:
                if data[2] != 0:
                    x = data[i][0]
                    y = data[i][1]
                    h = data[i][2]
                    H_max = h + abs(cx - x) + abs(cy - y)
                    break
            flag = True
            for i in range(n):
                    x = data[i][0]
                    y = data[i][1]
                    h = data[i][2]
                    if h != 0:
                        if not H_max == h + abs(cx-x) + abs(cy-y):
                            flag = False
                            break
                    else:
                        if not H_max <=  abs(cx-x) + abs(cy-y):
                            flag = False
                            break
            if flag:
                print(cx,cy,H_max)
                return 0

func()



### FIXED CODE ###



def func():

    n = int(input())
    data = []
    for i in range(n):
        data.append(list(map(int,input().split())))

    for cx in range(101):
        for cy in range(101):
            for line in data:
                if line[2] != 0:
                    x = line[0]
                    y = line[1]
                    h = line[2]
                    H_max = h + abs(cx - x) + abs(cy - y)
                    break
            flag = True
            for i in range(n):
                    x = data[i][0]
                    y = data[i][1]
                    h = data[i][2]
                    if h != 0:
                        if not H_max == h + abs(cx-x) + abs(cy-y):
                            flag = False
                            break
                    else:
                        if not H_max <=  abs(cx-x) + abs(cy-y):
                            flag = False
                            break
            if flag:
                print(cx,cy,H_max)
                return 0

func()
import math

c = list(map(float, input().split()))
a = c[0]
b = c[1]
x = c[2]
if x <= a * a * b / 2.0:
  print(90.0 - math.atan((x / a * 2.0 / b) / b) * 180.0 / math.pi)
else:
  print(math.atan(((a * a * b - x) / a * 2.0 / a) / a) * 180.0 / math.pi)

### FIXED CODE ###

import math

N = int(input())
a = N + 1
b = round(math.sqrt(N))

for i in range(b):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(round(a) - 2)
A, B = map(int, input().split())
if A < B*2:
  print(0)
else:
  print(A-B*2)

### FIXED CODE ###

A, B = map(int, input().split())
if A < B*2:
  print(0)
else:
  print(A-B*2)
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(n):
    for j in range(i+1 n):
        for k in range(j+1,n):
            if l[k]<l[j]+l[i]:
                ans += 1

            
print(ans)


### FIXED CODE ###

n = int(input())
l = list(map(int, input().split()))
l.sort(reverse=True)
ans = 0
for i in range(n-2):
    j = i+1
    k = n-1
    while j < k:
        if l[i]<l[j]+l[k]:
            ans += k-j
            j += 1
        else:
            k -= 1
print(ans)
(a, b, c) = input().rstrip().split()
a = int(a)
b = int(b)
c = int(c)

if a < b < c:
    print('Yes')
else;
    print('No')

### FIXED CODE ###

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

if a < b < c:
    print('Yes')
else:
    print('No')
a=int(input())
b=int(input())
if a<=8 and b<=8:
    print('Yay!')
else:
    print(':(')


### FIXED CODE ###

a,b=input().split()
if int(a)<=8 and int(b)<=8:
    print('Yay!')
else:
    print(':(')
N = int(input())
A = [0]
A.extend(list(map(int, input().split())))

buka_num = []

for i in range(1, N):　＃tmp_A = A[i:]
 buka_num.append(tmp_A.count(i))

buka_num.append(0)

print(buka_num, sep='¥n')

### FIXED CODE ###

import collections
N = int(input())
A = [0]
A.extend(list(map(int, input().split())))
c = collections.Counter(A)
buka_num = []

for i in range(1,N):
    buka_num.append(c[i])
    
buka_num.append(0)
for ele in buka_num:
    print(ele)
import math
import numpy as np
A,B,N=map(int,input().split())
range_list=list(range(1,N+1))
data2 = np.array(list(map(lambda x: A*math.floor(x/B), range_list)))
data1 = np.array(list(map(lambda x: math.floor(A*x/B), range_list)))

print(max(data1-data2))


### FIXED CODE ###

A,B,N=map(int,input().split())
if B<=N:
    print(int(A*(B-1)/B)-A*int((B-1)/B))
else:
    print(int(A*(N)/B)-A*int(N/B))
from collections import Counter
from operator import itemgetter

N = int(input())
p = []
for _ in range(N):
    p.append(tuple(map(int, input().split())))
p.sort(key=itemgetter(0), reverse=True)

d = []
for i, pp1 in enumerate(p):
    for j in range(i + 1, N):
        pp2 = p[j]
        d.append((pp1[0] - pp2[0], pp1[1] - pp2[1]))

c = Counter(d)

print(N - c.most_common()[0][1])


### FIXED CODE ###

from collections import defaultdict
from operator import itemgetter

N = int(input())
p = []
for _ in range(N):
    p.append(tuple(map(int, input().split())))
p.sort(key=itemgetter(0), reverse=True)

if N == 1:
    print(1)
else:
    d = defaultdict(int)
    for i, pp1 in enumerate(p):
        for j in range(i + 1, N):
            pp2 = p[j]
            d[(pp1[0] - pp2[0], pp1[1] - pp2[1])] += 1
        # print(d)

    cnt = 0
    keys = tuple(d.keys())
    for k in keys:
        x, y = k
        cnt = max(cnt, d[k] + d[(-x, -y)])

    print(N - cnt)
print(input()-(input()//15)*200)

### FIXED CODE ###

x=int(input())*800
print(x-x//12000*200)
# -*- coding: utf-8 -*-
s = input()
s = list(s)
x = 0
maxIndex = len(s) - 1
count = 0
while True:
    if len(s) - 1 == x:
        break
    if s[x] != s[x + 1]:
        s.pop(x)
        s.pop(x)
        count += 1
        x -= 1
    else:
        x += 1
print(count * 2)


### FIXED CODE ###

s = input()
x = 0
for c in s:
    if c == '1':
        x = x + 1
print(min(x, len(s) - x) * 2)
import numpy as np
from numba import njit
@njit
def main():
    R, C, K = map(int, input().split())
    scores = np.zeros((R,C), np.int64)
    for _ in range(K):
        r, c, v = map(int, input().split())
        scores[r-1][c-1] = v
    dp=np.zeros((R+1,C+1,4), np.int64)

    for i in range(1, R+1):
        for j in range(1, C+1):
            for k in range(4):
                dp[i][j][k] = max(dp[i][j-1][k],
                                dp[i-1][j][3])
            for k in range(3, 0, -1):
                dp[i][j][k] = max(dp[i][j][k],
                                  dp[i][j][k-1] + scores[i-1][j-1])

    answer = dp[R][C][3]
    print(answer)

if __name__ == "__main__":
    main()

### FIXED CODE ###

from numba import jit
import numpy as np

@jit
def main():
    R, C, K = map(int, input().split())
    scores = np.zeros((R,C), np.int64)
    for _ in range(K):
        r, c, v = map(int, input().split())
        scores[r-1][c-1] = v
    dp=np.zeros((R+1,C+1,4), np.int64)

    for i in range(1, R+1):
        for j in range(1, C+1):
            for k in range(4):
                dp[i][j][k] = max(dp[i][j-1][k],
                                dp[i-1][j][3])
            for k in range(3, 0, -1):
                dp[i][j][k] = max(dp[i][j][k],
                                  dp[i][j][k-1] + scores[i-1][j-1])

    
    return dp[R][C][3]

print(main())
h, w = map(int, input().split())

if h%3 == 0 or w%3 == 0:
    ans = 0
else:
    s = []
    high = max(h, w)
    low = min(h, w)
    s.append(round(high/3)*low)
    high2 = max(high-round(high/3), low)
    low2 = min(high-round(high/3), low)
    s.append(round(high2/2)*low2)
    s.append((high2-round(high2/2))*low2)
    ans = max(s) - min(s)
print (ans)
print (s)

### FIXED CODE ###

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


def area(s):
    ans = max(s) - min(s)
    return ans


if h % 3 == 0 or w % 3 == 0:
    ans = 0
else:
    temp = []
    s1 = [round(w / 3) * h, (w - round(w / 3)) * round(h / 2), round(w - w / 3) * (h - round(h / 2))]
    s2 = [round(h / 3) * w, (h - round(h / 3)) * round(w / 2), round(h - h / 3) * (w - round(w / 2))]
    temp.append(area(s1))
    temp.append(area(s2))
    if w > 2:
        s3 = [round(w / 3) * h, (w - round(w / 3) * 2) * h]
        temp.append(area(s3))
    if h > 2:
        s4 = [round(h / 3) * w, (h - round(h / 3) * 2) * w]
        temp.append(area(s4))
    ans = min(temp)
print(ans)
def main():
    M=10**9+7
    n,k,*a=map(int,open(0).read().split())
    x,y=[],[]
    for i in a:
        if i>0:x+=i,
        if i<0:y+=i,
    if len(x)+len(y)<k or k%2 and not x and len(y)<n:
        print(0)
        exit()
    if k%2 and not x:
        c=1
        for i in sorted(y)[-k:]:
            c=c*i%M
        print(c)
        exit()
    x=sorted(x)[::-1][:k]
    i=len(x)
    y.sort()
    m=len(y)
    j=0
    if i<k:
        j=k-i
        if j%2:1/0
        x+=y[:j]
        j+=1
    while i>1 and j+1<m and x[i-1]*x[i-2]<y[j]*y[j+1]:
        x[i-1],x[i-2]=y[j],y[j+1]
        i-=2
        j+=2
    c=1
    for i in x:
        c=c*i%M
    print(c)
main()

### FIXED CODE ###

def main():
    M=10**9+7
    n,k,*a=map(int,open(0).read().split())
    x,y=[],[]
    for i in a:
        if i>0:x+=i,
        if i<0:y+=i,
    if len(x)+len(y)<k or k%2 and not x and len(y)<n:
        print(0)
        return
    if n==k or k%2 and not x:
        c=1
        for i in sorted(x+y)[-k:]:
            c=c*i%M
        print(c)
        return
    x=sorted(x)[::-1][:k]
    i=len(x)
    y.sort()
    m=len(y)
    j=k-i
    if j%2:
        x=x[:-1]
        i-=1
        j+=1
    x+=y[:j]
    while i>1 and j+1<m and x[i-1]*x[i-2]<y[j]*y[j+1]:
        x[i-1],x[i-2]=y[j],y[j+1]
        i-=2
        j+=2
    c=1
    for i in x:
        c=c*i%M
    print(c)
main()
# coding: utf-8
# Your code here!
import itertools
import pandas as pd


### FIXED CODE ###

# coding: utf-8
# Your code here!

k, s = map(int, input().split())

cnt = 0

for i in range(k+1):
    for j in range(k+1):
        if s-i-j <= k and s-i-j>=0:
            cnt += 1

print(cnt)
n=int(input())
stairlist=list(map(int,input().split()))
stairlist.reverse()
for i in range(n):
  if stairlist[i+1]-stairlist[i]==1:
    stairlist[i+1]=stairlist[i+1]-1
  elif stairlist[i+1]-stairlist[i]>1:
    print("No")
    break
else:
  print("Yes")

### FIXED CODE ###

n=int(input())
stairlist=list(map(int,input().split()))
stairlist.reverse()
for i in range(n-1):
  if stairlist[i+1]-stairlist[i]==1:
    stairlist[i+1]=stairlist[i+1]-1
  elif stairlist[i+1]-stairlist[i]>1:
    print("No")
    break
else:
  print("Yes")
from collections import deque
k = int(input())

digsum = lambda x: sum(list(map(int, list(str(x)))))

que = deque([])
MAX = 500000
min_v = MAX
for i in range(MAX-1, 0, -1):
    v = i/digsum(i)
    if v <= min_v:
        que.append(i)
        # print(i, v)
        min_v = v
        
while k > 0:
    print(que.pop())
    k -= 1


### FIXED CODE ###

# almost the copy of answer #2730510 

def S(n):
    return sum(list(map(int, str(n))))

def norm(n):
    return n/S(n)

k = int(input())
j = 1
order = 1
for i in range(k):
    print(j)
    if norm(j+10**(order-1)) > norm(j+10**(order)):
        order += 1
    j += 10**(order-1)
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if 0 <= ((b - a) / (v - w)) <= t:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
    print('NO')
else:
    if 1 <= (abs(b - a) / (v - w)) <= t:
        print('YES')
    else:
        print('NO')
s,op,s2 = map(str,input().split(" "))

if op == '+':
  print(s+s2)

else:
  print(s-s2)

### FIXED CODE ###

A,op,B = map(str,input().split(" "))
if op == "+":
  print(int(A)+int(B))
else:
  print(int(A)-int(B))
import sys

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp
    return a

def list_to_string(a):
    s = ""
    for n in a:
        s += str(n) + " "
    return s.strip()

num = int(sys.stdin.readline().strip())

array = map(lambda x: int(x), sys.stdin.readline().strip().split(" "))

flag = True
swap_num = 0

while flag:
    flag = False
    for i in reversed(range(1, len(array))):
        if array[i] < array[i - 1]:
            swap(a, i, i-1)
            flag = True
            swap_num += 1
            
print list_to_string(array)
print str(swap_num)

### FIXED CODE ###

import sys

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp
    return a

def list_to_string(a):
    s = ""
    for n in a:
        s += str(n) + " "
    return s.strip()

num = int(sys.stdin.readline().strip())

array = map(lambda x: int(x), sys.stdin.readline().strip().split(" "))

flag = True
swap_num = 0

while flag:
    flag = False
    for i in reversed(range(1, len(array))):
        if array[i] < array[i - 1]:
            swap(array, i, i-1)
            flag = True
            swap_num += 1
            
print list_to_string(array)
print str(swap_num)
n,m = map(int, input().split())
while (n != 0 or m != 0):
    nlist = [int(input())for i in range(n)]
    mlist = [int(input())for i in range(m)]
    nsum = [] 
    for i in range(n):
        for k in range(n-i):
            c = 0 
            for l in range(i+1):
                c += nlist[k+l]
            nsum.append(c)
    count = 0
    for i in range(m):
        for k in range(m-i):
            c = 0
            for l in range(i+1):
                c += mlist[k+l]
            if (c in nsum):
                count += nsum.count(c)       
    print(count) 
    n,m = map(int, input().split())


### FIXED CODE ###

while True:
    n,m = map(int, input().split())
    if n == 0 and m == 0:
        break
    nlist = [0]
    mlist = [0]
    for i in range(n):
        nlist += [nlist[-1] + int(input())]
    for i in range(m):
        mlist += [mlist[-1] + int(input())]

    l = [0for i in range(1000*1501)]
    for i in range(n):
        t = 0
        for k in range(i+1,n+1):
            t = nlist[k] - nlist[i]
            l[t] += 1
    count = 0
    for i in range(m):
        for k in range(i+1,m+1):
            t = mlist[k] - mlist[i]
            count += l[t]
    
    print(count)
=int(input())
s=input()
bl=s.count('#')
wh=s.count('.')
if bl>wh:
    print(wh)
elif wh>bl:
    print(bl)

### FIXED CODE ###

N=int(input())
S = input()
white = S.count(".")
black = 0
ans = white + black
for i in range (N):
    if S[i] == "." :
        white -= 1
    else:
        black += 1
    ans = min(ans,white+black)
print(ans)
a,b,k=map(int,input().split())
 
count=0
for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    count +=1
    if count==k-1:
      num=i
      break
 
print(num)

### FIXED CODE ###

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

ans = []
for i in range(1, min(A, B) + 1):
    if (A%i==0) and (B%i==0):
        ans.append(i)

print(ans[-K])
def solve():
    n, data = [x for x in input().split(" ")]
    n = int(n)
    if data[:n//2] == data[n//2:-1]:
        return "Yes"
    return "No"

if __name__ == "__main__":
    # test = int(input())
    # for _ in test:
    solve()

### FIXED CODE ###

n = int(input())
s = input()
if (s[0:n//2]==s[n//2:]):
  print("Yes")
else:
  print("No")
import numpy as np
input()

def no_Divisible(num,num_list):
    for row in set(num_list):
        if num%row==0:
            return 0
    return 1

input_list = np.array(sorted(list(map(lambda x:int(x),input().split(" "))),reverse=True))
count = 0
prev_num = 0
for i,num in enumerate(input_list):
    if num == prev_num:
        continue
    #print(num)
    #print(input_list[i+1:]%num)
    #if sum(input_list[i+1:]%num==0):
    if no_Divisible(num,input_list[i+1:]):
        count += 1
    prev_num = num
print(count)



### FIXED CODE ###

x,y = map(lambda x:int(x),input().split(" "))
if y==0:
    print(x)
else:
    input_list = list(map(lambda x:int(x),input().split(" ")))
    for i in range(y+2):
        if x-i not in input_list:
            print(x-i)
            break
        elif x+i not in input_list:
            print(x+i)
            break
import fraction
a, b = map(int, input().split())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
print(lcm(a, b))

### FIXED CODE ###

a = [int(input())]
b = [int(input())]
l = [1, 2, 3]
ans = set(l) - set(a) -set(b)
print(list(ans)[0])
# -*- coding: utf-8 -*-
# @Date    : 2019-06-15 20:02:29
# @Author  : raj lath (oorja.halt@gmail.com)
# @Link    : link
# @Version : 1.0.0

import sys
sys.setrecursionlimit(10**5+1)

inf     =  int(10 ** 20)
max_val =  inf
min_val = -inf

RW  = lambda : sys.stdin.readline().strip()
RI  = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
from collections import defaultdict

nb_points = RI()
points    = [RMI() for _ in range(nb_points)]
pq = defaultdict(int)
for i in range(nb_points):
    for j in range(nb_points):
        if i == j : continue
        p1 = points[i][0] - points[j][0]
        q1 = points[i][1] - points[j][1]
        pq[(p1, q1)]  = pq.get((p1, q1), 0) + 1
print(nb_points - max(pq.values()))


### FIXED CODE ###


# -*- coding: utf-8 -*-
# @Date    : 2019-06-15 20:02:29
# @Author  : raj lath (oorja.halt@gmail.com)
# @Link    : link
# @Version : 1.0.0

import sys
sys.setrecursionlimit(10**5+1)

inf     =  int(10 ** 20)
max_val =  inf
min_val = -inf

RW  = lambda : sys.stdin.readline().strip()
RI  = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
from collections import defaultdict

nb_points = RI()
points    = [RMI() for _ in range(nb_points)]
if nb_points == 1:
    print(1)
else:
    pq = defaultdict(int)
    for i in range(nb_points):
        for j in range(nb_points):
            if i == j : continue
            p1 = points[i][0] - points[j][0]
            q1 = points[i][1] - points[j][1]
            pq[(p1, q1)]  = pq.get((p1, q1), 0) + 1
    print(nb_points - max(pq.values()))
import math

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

min = x
for i in range(n):
    m = int(input())
    x -= m
    if min > m:
        min = m

print(n + math.floor(ans/min))


### FIXED CODE ###

import math

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

min = x
for i in range(n):
    m = int(input())
    x -= m
    if min > m:
        min = m

print(n + math.floor(x/min))
import sys
from sys import stdin
import numpy as np

N, M = map(int, input().split())
L, R - list(), list()
for i in range(M):
  l,r = stdin.readline().rstrip().split()
  L.append(int(l))
  R.append(int(r))

inputs = np.vstack(L, R).T
  
count = 0
for i in range(1, N+1):
  out = (inputs[:, 0] >= i) & (inputs[:, 1] <= i)
  if out.all():
    count += 0
  
print(count)
  

### FIXED CODE ###

import sys
from sys import stdin
import numpy as np

N, M = map(int, input().split())
L, R = list(), list()
for i in range(M):
  l,r = stdin.readline().rstrip().split()
  L.append(int(l))
  R.append(int(r))

L = np.array(L)
R = np.array(R)

if R.min() - L.max() < 0:
  print(0)
else:
  print(R.min() - L.max() + 1)
a, b, c, x = [int(input()) for _ in range(4)]
cnt = 0
for ai in range(a+1):
    for bi in range(b+1):
        for ci in range(c+1):
            if 500*ai + 100*bi + 50*ci == x:
                cnt += 1
print(cnt)


### FIXED CODE ###

x = int(input())
a = int(input())
b = int(input())
print((x-a)%b)
n = int(input())
ans = 0

for s, t in range(8):
  if n == s*t:
    ans += 1
    
if ans == 0:
  print('No')
else:
  print('Yes')
  

### FIXED CODE ###

n = int(input())
ans = 0

for s in range(1,10):
    for t in range(1,10):
        if n == s*t:
            ans += 1
    
if ans == 0:
  print('No')
else:
  print('Yes')
N = int(input())
 
link = [[] for _ in range(N)]
for _ in range(N - 1):
    u, v, w = map(int, input().split())
    link[u - 1].append((v - 1, w))
    link[v - 1].append((u - 1, w))
 
d = [-1] * N
d[0] = 0
q = [0]
while q:
  i = q.pop(0)
  for n, w in link[i]:
    if d[n] == -1:
      d[n] = d[i] + w
      q.append(n)
      print(q)
 
for i in d:
  print(i % 2)

### FIXED CODE ###

N = int(input())
 
link = [[] for _ in range(N)]
for _ in range(N - 1):
    u, v, w = map(int, input().split())
    link[u - 1].append((v - 1, w))
    link[v - 1].append((u - 1, w))
 
d = [-1] * N
d[0] = 0
q = [0]
while q:
  i = q.pop(0)
  for n, w in link[i]:
    if d[n] == -1:
      d[n] = d[i] + w
      q.append(n)
 
for i in d:
  print(i % 2)
A, B, K = [int(i) for i in input().split()]
if K <= A:
    a -= K
elif A < K and K <= A+B:
    a = 0
    b = B-(K-A)
else:
    a = 0
    b = 0
print(a, b)


### FIXED CODE ###

A, B, K = [int(i) for i in input().split()]
if K <= A:
    a = A-K
    b = B
elif A < K and K <= A+B:
    a = 0
    b = B-(K-A)
else:
    a = 0
    b = 0
print(a, b)
def main():
    n = int(input())
    a = list(map(int,input().split()))
    x = 1
    if 0 in a:
        print(0)
        return
    for i in a:
        x *= i
        if x > 1000000000000000000:
            print(-1)
            return
    print(x)
main()

### FIXED CODE ###

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

def judge(a, b):
    product = a * b
    if product % 2 == 0:
        return Even
    elif product % 2 == 1:
        return Odd
    break

print(judge(a, b))


### FIXED CODE ###

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

def judge(a, b):
    product = a * b
    if product % 2 == 0:
        return "Even"
    elif product % 2 == 1:
        return "Odd"

print(judge(a, b))
#D問題
mod = 1000000007
S = str(input())
N = len(S)

dp = [[0 for i in range(13)] for j in range(N+1)]
dp[0][0] = 1
for i in range(N):
    if S[i] == "?":
        for j in range(10):
            for k in range(13):
                ind = (10*k+j)%13
                dp[i+1][ind] += dp[i][k]
    else:
        s = int(S[i])
        for k in range(13):
            ind = (10*k+j)%13
            dp[i+1][ind] += dp[i][k]
            
print(dp[N][5]%mod)

### FIXED CODE ###

#D問題
mod = 1000000007
S = str(input())
N = len(S)


dp = [[0 for i in range(13)] for j in range(N+1)]
dp[0][0] = 1
for i,s in enumerate(S):
    if s == "?":
        for j in range(10):
            for k in range(13):
                ind = (10*k+j)%13
                dp[i+1][ind] += dp[i][k]
    else:
        j = int(s)
        for k in range(13):
            ind = (10*k+j)%13
            dp[i+1][ind] += dp[i][k]

    for k in range(13):
        dp[i+1][k]%=mod
            
print(dp[N][5]%mod)