Harryxun/stf_run huggingface dataset:
from collections import Counter
K, N = map(int, input().split())
mod = 998244353
frac = [1]*2010
for i in range(2,2010):
    frac[i] = i * frac[i-1]%mod
def comb(a, b):
    if not a >= b >= 0:
        return 0
    return frac[a]*pow(frac[b], mod-2, mod)*pow(frac[a-b], mod-2, mod)%mod
A = Counter()
def calc(x):
    if A[x]:
        return A[x]
    res = 0
    for i in range(N//2+1):
        res = (res + (-1)**i*comb(x, i)*comb(N+K-1-2*i, N-2*i))%mod
    A[x] = res
    return res
for j in range(2, 2*K+1):
    print(calc(min(j, (2*K+2-j))//2))

### FIXED CODE ###

from collections import Counter
K, N = map(int, input().split())
mod = 998244353
frac = [1]*5010
for i in range(2,5010):
    frac[i] = i * frac[i-1]%mod
fraci = [None]*5010
for i in range(5010):
    fraci[i] = pow(frac[i], mod-2, mod)
def comb(a, b):
    if not a >= b >= 0:
        return 0
    return frac[a]*fraci[b]*fraci[a-b]%mod
A = Counter()
def calc(x):
    if A[x]:
        return A[x]
    res = 0
    for i in range(N//2+1):
        res = (res + (-1)**i*comb(x, i)*comb(N+K-1-2*i, N-2*i))%mod
    A[x] = res
    return res
for j in range(2, 2*K+1):
    print(calc(min(j, (2*K+2-j))//2))
def main():
    def dfs(d,R,sx,sy):
        if d == R:
            return 0
        x = 0
        y = 0
        for i in range(H):
            for j in range(W):
                if A[i][j] == d + D:
                    x = i
                    y = j
                    break
            else:
                continue
            break
        
        res = abs(x - sx) + abs(y - sy) + dfs(d+D,R,x,y)

        return res
    
    H, W, D = map(int, input().split())
    A = [list(map(int, input().split())) for _ in range(H)]
    Q = int(input())

    for _ in range(Q):
        L, R = map(int, input().split())
        sx = 0
        sy = 0
        for i in range(H):
            for j in range(W):
                if A[i][j] == L:
                    sx = i
                    sy = j
                    break
            else:
                continue
            break
        print(dfs(L,R,sx,sy))

        
        
        

main()

### FIXED CODE ###

def main():
    H, W, D = map(int, input().split())
    field = [list(map(int, input().split())) for _ in range(H)]

    c = [0] * (H * W)
    for i in range(H):
        for j in range(W):
            c[field[i][j] - 1] = (i, j)
    
    d = [0] * (H * W)
    for l in range(H * W - D):
        i, j = c[l]
        x, y = c[l + D]
        d[l+D] = d[l] + abs(x - i) + abs(y - j)
    
    Q = int(input())
    for _ in range(Q):
        L, R = map(int, input().split())
        print(d[R-1]-d[L-1])


main()
import math
import copy
# import numpy as np

# ===FUNCTION===

def getInputNum():
    inputNum = int(input())
    return inputNum

def getInputListInt():
    outputoData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData

def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList

def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList

# ===CODE===

num = getInputListInt()

a = num[0]
b = num[1]
c = num[2]
d = num[3]

c_modzero = math.floor(b/c) - math.floor((a-1)/c)
d_modzero = math.floor(b/d) - math.floor((a-1)/d)

cd = math.floor(c*d/ math.gcd(c, d))

cd_modzero = math.floor(b/(cd)) - math.floor((a-1)/(cd))

ans = b - a + 1 - (c_modzero + d_modzero - cd_modzero)

print(ans)

### FIXED CODE ###

# import math
# import copy
# import fractions
# import numpy as np
#
# # ===FUNCTION===
#
# def getInputNum():
#     inputNum = int(input())
#     return inputNum
#
# def getInputListInt():
#     outputoData = []
#     inputData = input().split()
#     outputData = [int(n) for n in inputData]
#
#     return outputData
#
# def getSomeInputInt(n):
#     outputDataList = []
#     for i in range(n):
#         inputData = int(input())
#         outputDataList.append(inputData)
#
#     return outputDataList
#
# def getSomeInputListInt(n):
#     inputDataList = []
#     outputDataList = []
#     for i in range(n):
#         inputData = input().split()
#         inputDataList = [int(n) for n in inputData]
#         outputDataList.append(inputDataList)
#
#     return outputDataList
#
# # ===CODE===
#
# num = getInputListInt()
#
# a = num[0]
# b = num[1]
# c = num[2]
# d = num[3]
#
# c_modzero = math.floor(b/c) - math.floor((a-1)/c)
# d_modzero = math.floor(b/d) - math.floor((a-1)/d)
#
# cd = c / fractions.gcd(c, d) *d
#
# cd_modzero = math.floor(b/cd) - math.floor((a-1)/cd)
#
# ans = b - a + 1 - (c_modzero + d_modzero - cd_modzero)
#
# print(int(ans))

import copy



# input = sys.stdin.readline

# ~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

def GCD(x, y):
    return x if y == 0 else GCD(y, x % y)


def LCM(x, y):
    return x // GCD(x, y) * y


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

S = B - A + 1

canC = B // C - (A - 1) // C
canD = B // D - (A - 1) // D
canCD = B // LCM(C, D) - (A - 1) // LCM(C, D)

print(S - (canC + canD) + canCD)
import collections


class unionFind:
    parent = []

    def __init__(self, N):
        self.parent = [i for i in range(N)]

    def root(self, x):
        if self.parent[x] == x:
            return(x)
        else:
            self.parent[x] = self.root(self.parent[x])
            return(self.parent[x])

    def same(self, x, y):
        x, y = x-1, y-1
        return(self.root(x) == self.root(y))

    def unite(self, x, y):
        x, y = x-1, y-1
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        else:
            self.parent[x] = y
            return


N, M = map(int, input().split())
G = unionFind(N)
for i in range(M):
    a, b = map(int, input().split())
    G.unite(a, b)

for i in range(N):
    G.root(i)

C = collections.Counter(G.parent).most_common()

print(1)
# print(C[0][1])


### FIXED CODE ###

import collections
import sys
sys.setrecursionlimit(10**6)
N, M = map(int, input().split())
AB = [tuple(map(int, input().split())) for i in range(M)]


class unionFind:
    parent = []

    def __init__(self, N):
        self.parent = [i for i in range(N)]

    def root(self, x):
        if self.parent[x] == x:
            return(x)
        else:
            self.parent[x] = self.root(self.parent[x])
            return(self.parent[x])

    def same(self, x, y):
        x, y = x-1, y-1
        return(self.root(x) == self.root(y))

    def unite(self, x, y):
        x, y = x-1, y-1
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        else:
            self.parent[x] = y
            return


G = unionFind(N)

for a, b in AB:
    G.unite(a, b)

for i in range(N):
    G.root(i)

C = collections.Counter(G.parent).most_common()

print(C[0][1])
N,X = map(int,input().split())
L = list(map(int,input().split()))
cnt = 0
i = 0
cnt += L[i]
while cnt<=X:
    i += 1
    cnt += L[i]
print(i+1)

### FIXED CODE ###

import bisect
N,X = map(int,input().split())
L = list(map(int,input().split()))
D = [0 for _ in range(N+1)]
for i in range(1,N+1):
    D[i] = D[i-1]+L[i-1]
ind = bisect.bisect_right(D,X)    
print(ind)
n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]

if k > q:
  res = ['Yes'] * n
else:
  res = ['No'] * n
  ans = set(a)
  for i in range(len(ans)):
    if k - q + a.count(ans[i]) > 0:
      res[ans[i]-1] = 'Yes'
print('\n'.join(map(str, res)))

### FIXED CODE ###

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

if k - q > 0:
  res = ['Yes'] * n
else:
  res = ['No'] * n
  ans = [0] * n
  for i in range(len(a)):
    ans[a[i]-1] += 1
  for i in range(n):
    if k - q + ans[i] > 0:
      res[i] = 'Yes'
print('\n'.join(map(str, res)))
N, M = map(int, input().split(" "))
flag = [1 for i in range(M)]
height = list(map(int, input().split(" ")))
for i in range(M):
  a, b = map(int, input().split(" "))
  if height[a - 1] < height[b - 1]:
    flag[a - 1] = 0
  elif height[a - 1] > height[b - 1]:
    flag[b - 1] = 0
  else:
    flag[a - 1] = flag[b - 1] = 0
print(sum(flag))

### FIXED CODE ###

N, M = map(int, input().split(" "))
height = list(map(int, input().split(" ")))
flag = [1 for i in height]
for i in range(M):
  a, b = map(int, input().split(" "))
  if height[a - 1] > height[b - 1]:
    flag[b - 1] = 0
  elif height[b - 1] > height[a - 1]:
    flag[a - 1] = 0
  else:
    flag[a - 1] = 0
    flag[b - 1] = 0
print(sum(flag))
n = int(input())
G = [[] for _ in range(n)] 
for i in range(n - 1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    G[a].append([b, c])
    G[b].append([a, c])

vis = [False] * n
d = [-1] * n
def dfs(k, depth):
    vis[k] = True
    d[k] = depth
    for i in G[k]: # i: [to, cost]
        if not vis[i[0]]: dfs(i[0], depth + i[1])

q, k = map(int, input().split())
dfs(k - 1, 0)

for i in range(q):
    x, y = map(int, input().split())
    print(d[x - 1] + d[y - 1])

### FIXED CODE ###

from collections import deque
n = int(input())
G = [deque([]) for _ in range(n)]
for i in range(n - 1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    G[a].append([b, c])
    G[b].append([a, c])
dist = [-1] * n

def dfs(v):
    cnt = 0
    stack = [[v, 0]]
    while stack:
        x = stack[-1]
        if len(G[x[0]]) > 0:
            w = G[x[0]].popleft()
            if dist[w[0]] == -1:
                dist[w[0]] = w[1] + dist[x[0]]
                stack.append(w)
        else: stack.pop()

q, k = map(int, input().split())
k -= 1
dist[k] = 0
dfs(k)
for i in range(q):
    x, y = map(int, input().split())
    print(dist[x - 1] + dist[y - 1])
#print(dist)
import bisect

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

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1] or len(A)==0:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        n=len(A)
        if R-1>=b:
            if b>=n:
                A=[]
                ans+=b*n
                break
            else:
                A[0:b]=[]
                ans+=b*c
        else:
            A[0:R]=[]
            ans+=R*c
        
print(sum(A)+ans)

### FIXED CODE ###

import bisect

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

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1]:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        n=len(A)
        if R>b:
            if n<=b:
                A=[]
                ans+=n*c
                break
            else:
                del A[0:b]
                ans+=b*c
        else:
            del A[0:R]
            ans+=R*c
    if len(A)==0:
        break        
print(sum(A)+ans)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, M = MAP()

if M == 0:
	print(0, 0)
else:
	temp = [input().split() for _ in range(M)]
	temp = [list(x) for x in zip(*temp)]
	p, S = list(map(int, temp[0])), temp[1]

	a = [i for i, x in enumerate(S) if x == 'AC']
	a.append(a[len(a)-1])

	AC = 0
	WA = 0

	for i in range(len(p)):
		if S[i]=="AC":
			if i == len(p)-1:
				AC += 1
			else:
				if p[i]==p[i+1]:
					if S[i+1]=="WA":
						AC += 1
					else:
						continue
				else:
					AC += 1
		else:
			if i < a[AC]:
	 			WA += 1
	print(AC, WA)

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, M = MAP()

def indexs(l, x, default=-1):
    if x in l:
        return l.index(x)
    else:
        return -1

if M == 0:
	print(0, 0)
else:
	temp = [input().split() for _ in range(M)]
	temp.append([N+1, "WA"])
	temp.sort(key=lambda x:int(x[0]))
	temp = [list(x) for x in zip(*temp)]
	p, S = list(map(int, temp[0])), temp[1]

	index = 0
	AC = 0
	WC = 0
	a = []
	for i in range(M):
		if p[i]!=p[i+1]:
			a.append(indexs(S[index:i+1], "AC"))
			index = i+1
	index = 0
	for i in range(M):
		if p[i]!=p[i+1]:
			if a[index]>=0:
				AC += 1
				WC += a[index]
			index += 1	
	print(AC, WC)
#!/usr/bin/env python
# coding: utf-8

# In[1]:


from sys import stdin
input = stdin.readline
N, Q = map(int, input().split())
abs_ = [list(map(int, input().split())) for _ in range(N-1)]
pxs_ = [list(map(int, input().split())) for _ in range(Q)]


# In[13]:


class Node:
    def __init__(self, nb, data): #コンストラクタ
        self.nb = nb
        self.data = data #ノードがもつ数値
        #self.parent = -1 # nodeがrootのとき-1、それ以外番号
        self.childs = [] # childになるnode classが入る
        
    def connect_childs(self, child_class_):
        self.childs.append(child_class_)


# In[44]:


nodes = [Node(_+1, 0) for _ in range(N)]


# In[45]:


for i in range(N-1):
    a, b = abs_[i]
    nodes[a-1].connect_childs(nodes[b-1])
    nodes[b-1].parent = a-1


# In[46]:


for i in range(Q):
    p, x = pxs_[i]
    nodes[p-1].data += x


# In[47]:


def sum_data_to_childs(node):
    data = node.data
    for child in node.childs:
        child.data += data
        sum_data_to_childs(child)


# In[48]:


sum_data_to_childs(nodes[0])


# In[49]:


datas = [str(nodes[_].data) for _ in range(N)]
print(' '.join(datas))


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[17]:


from sys import stdin
input = stdin.readline

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


# In[18]:


class Node:
    def __init__(self, nb, data): #コンストラクタ
        self.nb = nb
        self.data = data #ノードがもつ数値
        self.parent = -1 # nodeがrootのとき-1、それ以外番号
        #self.childs = [] # childになるnode classが入る
        
    #def connect_childs(self, child_class_):
    #    self.childs.append(child_class_)


# In[19]:


nodes = [Node(_+1, 0) for _ in range(N)]


# In[12]:


for i in range(N-1):
    a, b = map(int, input().split())
    #nodes[a-1].connect_childs(nodes[b-1])
    nodes[b-1].parent = a-1


# In[13]:


for i in range(Q):
    p, x = map(int, input().split())
    nodes[p-1].data += x


# In[14]:


def sum_data_to_childs(nodes):
    datas = [0]*N
    
    datas[0] = nodes[0].data
    
    for i in range(1, N):
        nodes[i].data += nodes[nodes[i].parent].data
        #print(nodes[i].data)
        datas[i] = nodes[i].data
        
    return datas


# In[15]:


datas = sum_data_to_childs(nodes)


# In[16]:


print(' '.join(map(str, datas)))


# In[20]:


#datas = [0] * N


# In[21]:


#child = [[]] * N


# In[22]:


#print(child)


# In[ ]:
a,b=map(int,input())
s=str(input())
if s[:a].isnumeric() and s[a]=="-" and s[a+1:].isnumeric():
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a,b=map(int,input().split())
s=str(input())
if s[:a].isnumeric() and s[a]=="-" and s[a+1:].isnumeric():
    print("Yes")
else:
    print("No")
iN,iM = [int(x) for x in input().split()]
iD = 10**9 +7 #法

def fPrimeCounter(iM):
    iS = int(iM ** 0.5) + 1
    aRet = []
    for i in range(2,iS + 1):
        iCounter = 0
        while iM % i == 0:
            iM = iM / i
            iCounter += 1
        if 0 < iCounter : aRet.append(iCounter)
        if iM == 1 : break
    if 1 < iM  : aRet.apend(1)
    return aRet

#二分累乗法 iDを法として
def fBiPow(iX,iN,iD):
    iY = 1
    while iN > 0:
        if iN % 2 == 0:
            iX = iX * iX % iD
            iN = iN // 2
        else:
            iY = iX * iY % iD
            iN = iN - 1
    return iY

aP = fPrimeCounter(iM)
iMax = max(aP) + iN - 1
aM = [1] * (iMax + 1)
#階乗 iD を法とした
for i in range(1,iMax + 1):
    aM[i] = aM[i-1] * i  % iD
aInvM = [1]* (iMax + 1)
aInvM[iMax] = fBiPow(aM[iMax],iD-2,iD)
#階乗の逆元 iD を法とした
for i in range(iMax,0,-1):
    aInvM[i-1] = aInvM[i]*i % iD

iRet = 1
for i in aP:
    # i + iN -1  C  iN -1
    iRet *= aM[i+iN-1] * aInvM[iN-1] * aInvM[i] % iD
iRet %= iD
print(iRet)



### FIXED CODE ###

iN,iM = [int(x) for x in input().split()]
iD = 10**9 +7 #法

def fPrimeCounter(iM):
    i = 2
    iS = int(iM ** 0.5) + 1
    aRet = []
    while i < iS or iM != 1:
        iCounter = 0
        while iM % i == 0:
            iM = iM // i
            iCounter += 1
        if 0 < iCounter : aRet.append(iCounter)
        i += 1

    return aRet

#二分累乗法 iDを法として
def fBiPow(iX,iN,iD):
    iY = 1
    while iN > 0:
        if iN % 2 == 0:
            iX = iX * iX % iD
            iN = iN // 2
        else:
            iY = iX * iY % iD
            iN = iN - 1
    return iY

aP = fPrimeCounter(iM)
if aP == [] :
    print (1)
else:
    iMax = max(aP) + iN - 1
    aM = [1] * (iMax + 1)
    #階乗 iD を法とした
    for i in range(1,iMax + 1):
        aM[i] = aM[i-1] * i  % iD
    aInvM = [1]* (iMax + 1)
    aInvM[iMax] = fBiPow(aM[iMax],iD-2,iD)
    #階乗の逆元 iD を法とした
    for i in range(iMax,0,-1):
        aInvM[i-1] = aInvM[i]*i % iD

    iRet = 1
    for i in aP:
        # i + iN -1  C  iN -1
        iRet *= aM[i+iN-1] * aInvM[iN-1] * aInvM[i] % iD
    iRet %= iD
    print(iRet)
n = int(input())
k = len(set(map(str, input().split())))
if k = 4:
  print('Four')
else:
  print('Three')


### FIXED CODE ###

n = int(input())
k = len(set(map(str, input().split())))
if k == 4:
  print('Four')
else:
  print('Three')
x,y=int(input().split())
s=x*y
l=2*x+2*y
print(s," ",l)

### FIXED CODE ###

x,y=[int(i) for i in input().split()]
s=x*y
l=2*x+2*y
print(s,l)
import numpy as np
S = input()
mod = 10 ** 9 + 7

n = len(S)
dp = np.zeros((n, 13))
a = S[-1]
now, pre = 10, 1
x_ = dp[0]
l = [1, 10, 9, 12, 3, 4]
l = [[i * l_ % 13 for i in range(1, 10)] for l_ in l]
li = 1
if a == "?":
    x_[0:10] = 1
else:
    x_[int(a)] = 1
for s, x in zip(S[-2::-1], dp[1:]):
    if s == "?":
        x += x_
        for v in l[li]:
            x[v:] += x_[:-v]
            x[:v] += x_[-v:]
    else:
        if s == "0":
            x += x_
        else:
            x[v:] += x_[:-v]
            x[:v] += x_[-v:]
    x %= mod
    li += 1
    li %= 6
    x_ = x
print(int(dp[-1][5]))

### FIXED CODE ###

#!python3

LI = lambda: list(map(int, input().split()))

# input
S = input()

MOD = 10 ** 9 + 7


def main():
    n = len(S)
    m = 5
    w = []
    p = 1
    for i in range(n):
        s = S[-1 - i]
        if s == "?":
            w.append(p)
        else:
            m = (m - int(s) * p) % 13
        p = p * 10 % 13

    n = len(w)
    l1 = [0] * 13
    l1[0] = 1
    for i in range(1, n + 1):
        l2 = [0] * 13
        for j in range(10):
            x = w[i - 1] * j % 13
            for k in range(13):
                t = (x + k) % 13
                l2[t] += l1[k]
        l1 = [y % MOD for y in l2]
    
    ans = l1[m]
    print(ans)


if __name__ == "__main__":
    main()
n=int(input())
k=1000-n%1000
if k!=1000:
	print(k)
else:
  prnt(0)

### FIXED CODE ###

n=int(input())
k=n%1000
if k!=0:
	print(1000-k)
else:
  print(k)
a=[]
while True:
 n = raw_input()
  if n == 0:
   break
  a.append(n)
for i in range(len(a)):
 print(f'Case{i+1}: {a[i]}')

### FIXED CODE ###

import sys
i=1
for e in sys.stdin:
 if'0\n'==e:break
 print(f'Case {i}: {e[:-1]}');i+=1
array = list(map(int, input().split()))                                                        
  
sort_array = array.sort()
 
for i in range(len(array)):
    if i == 0 and sort_array[i] == 5:
        continue
    elif  i==0 and not(sort_array[i]) == 5:
        print("No")
        break
 
    if i==1 and sort_array[i] == 5:
        continue
    elif  i==1 and not(sort_array[i]) == 5:
        print("No")
        break
 
 
    if i==2 and sort_array[i] == 7:
        print("YES")
    elif  i==2  and not(sort_array[i]) == 7:
        print("NO")
        break


### FIXED CODE ###

array = list(map(int, input().split()))                                                        
  
array.sort()

if array[0] == 5 and array[1] == 5 and array[2] == 7:
  print("YES")
else:
  print("NO")
N = int(input())
# N = 4n+7m 
if N % 4 == 0 or N % 7 ==0 or N % == 4:
  print("Yes")
else:
  print("No")



### FIXED CODE ###

N = int(input())
m = 0
for i in range(15):
  n = N-7*m
  if n < 0:
    print("No")
    break
  elif n % 4 == 0:
    print("Yes")
    break
  elif m == 14:
    print("No")
  m += 1
import sys
 
a = sys.argv
i1 = int(a[1])
i2 = int(a[2])
if i1 < 10 and i2 < 10:
  print(i1 * i2)
else:
  print(-1)


### FIXED CODE ###

a,b =map(int,input().split())
ai = int(a)
bi = int(b)
 
if ai < 10 and bi < 10:
  print(ai * bi)
else:
  print(-1)
import bisect
N = int(input())
A = sorted(map(int, input().split()))
B = sorted(map(int, input().split()))
C = sorted(map(int, input().split()))
ans = 0
for i in range(N):
    upi = bisect.bisect_left(A, B[i])
    dwi = bisect.bisect_left(C, B[i])
    if C[dwi] == B[i]:
        dwi = bisect.bisect_left(C, B[i] + 1)
    ans += upi*(N - dwi)

print(ans)

### FIXED CODE ###

from bisect import bisect_right
from bisect import bisect_left
 
n = int(input())
a = sorted(map(int, input().split()))
b = sorted(map(int, input().split()))
c = sorted(map(int, input().split()))
cnt = 0
bn = []
for i in range(n):
    x1 = bisect_left(a, b[i])
    x2 = bisect_right(c, b[i])
    cnt += x1*(n-x2)
print(cnt)
s = input()

def solve(i):
    
    if i == 2:
        if s[i - 1] == s[i]:
            return 2
        else:
            return solve(i - 1) + 1
    if i == 1:
        if s[i - 1] == s[i]:
            return 1
        else:
            return 2
    if i == 0:
        return 0

    if s[i] != s[i - 1]:
        return solve(i - 1) + 1
    else:
        return solve(i - 3) + 2


print(solve(len(s) - 1))


### FIXED CODE ###

import sys

sys.setrecursionlimit(2000000)

s = input()

def solve(i):
    if i == 2:
        if s[i - 1] == s[i]:
            return 2
        else:
            return solve(i - 1) + 1
    if i == 1:
        if s[i - 1] == s[i]:
            return 1
        else:
            return 2
    if i == 0:
        return 1

    if s[i] != s[i - 1]:
        return solve(i - 1) + 1
    else:
        return solve(i - 3) + 2


print(solve(len(s) - 1))
N=input().replace(""," ").split()
N=set(N)
if len(N)=<2:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n=list(input())
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
    print("Yes")
else:
    print("No")
a,b=map(int, input().split)
if 1<=a<=9 and 1<=b<=9:
  print("a*b")
else:
  print("-1")

### FIXED CODE ###

a,b=map(int,input().split())
if a>=10 or b>=10:
  print(-1)
else:
  print(a*b)
input();l=input().split();x=1
for j in sorted(l):
  x:=x*int(j)if x>1e18or x<0else-1
print(x)

### FIXED CODE ###

i = input
i()
x = 1
l = i().split()
if '0' in l:
    print(0)
    quit()
for j in l:
    x *= int(j)
    if x > 1e18:
        print(-1)
        quit()
print(x)