Harryxun/stf_run huggingface dataset:
import numpy as np


#def area##################################

def zero(n):
	c=list()
	for i in range(n):
		c+=[0]
	return c

###########################################

f_input=map( int,raw_input().split(" ")  )


vec=f_input[0]
col=f_input[1]


#zero teigi
null=list()
for i in range(vec):
	null.append(zero(col))
#print null
cvarea=np.matrix(null)


k=list()
for i in range(col):
	k+=[[0]]
k=np.matrix(k)
varea=k

#print "cvarea="
#print cvarea
#print "varea="
#print varea





#print "kokkara"

for i in range(vec):
	N=map(int,raw_input().split(" "))
	print N
	M=np.matrix(N)
	print M
	cvarea[i]+=N
#print "cvarea="
#print cvarea

for i in range(col):
	N=int(raw_input())
	varea[i]+=N
#print "varea="
#print varea

sol=cvarea*varea
print sol

### FIXED CODE ###

A=map(int,raw_input().split(" "))
vec=A[0]
col=A[1]

def zero(n):
	zerolist=list()
	for i in range(n):
		zerolist+=[0]
	return(zerolist)
A=list()
for i in range(vec):
	A+=[zero(col)]



for i in range(vec):
	k=map(int,raw_input().split(" "))
	for j in range(col):
		A[i][j]=k[j]

#ok

v=zero(col)

for i in range(col):
	v[i]=int(raw_input())

k=0
for i in range(vec):
	for j in range(col):
		k+=A[i][j]*v[j]
	print k
	k=0
t = input()
if t[len(t)]=="?":
    g == "D"
for i in range(len(t-1)):
    if t[i+1] == "?":
        if i == 0 and t[i+2] =="D":
            f="P"
        elif i == 0:
            f="D"
        if i > 1 and t[i]=="P" or s[i] =="P":
            f="D"
    s=s+f
print(s+g)

### FIXED CODE ###

T = input()
print(T.replace('?','D'))
from scipy.special import comb

gusu, kisu = input().split()
gusu = int(gusu) # 個数
kisu = int(kisu) # 個数
gusu_num = comb(gusu, 2, exact=True)
kisu_num = comb(kisu, 2, exact=True)
print(gusu_num + kisu_num)

### FIXED CODE ###

from scipy.misc import comb
gusu, kisu = input().split()
gusu = int(gusu) # 個数
kisu = int(kisu) # 個数
gusu_num = comb(gusu, 2, exact=True)
kisu_num = comb(kisu, 2, exact=True)
print(gusu_num + kisu_num)
K=int(input())
S=list(input())

if (len(S)+1) <= K:
    print(S)
else:
    print(S[0:(SL-1):1],"...")


### FIXED CODE ###

K=int(input())
S=input()
s=list(S)

if len(s) <= K:
    print(S)
else:
    print(S[0:K:]+"...")
N = int(input())
A = list(map(int, input().split()))

import math

def product(iterable):
    prod = 1
    for n in iterable:
        prod *= n
    return prod

def npr(n, r):
    return product(range(n - r + 1, n + 1))

def ncr(n,r):
    if r > n // 2:
        r = n - r
    return npr(n, r) // math.factorial(r)

a = list(set(A))
a_n = []
c = []
new = []
if len(a) != N:
  for i in range(len(a)):
    x = A.count(a[i])
    a_n.append(x)
    c.append(ncr(x,2))
    if x > 2: new.append(ncr(x-1,2))
    else: new.append(0)

  ans = sum(c)
  for i in range(N):
    n = a.index(A[i])
    print(ans-c[n]+new[n])
else:
  for _ in range(N):
    print(0)

### FIXED CODE ###

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

a = list(set(A))
a_c = {}
for v in A:
  if v in a_c:
    a_c[v] += 1
  else:
    a_c[v] = 1

def cmb(n):
  if n < 2: return 0
  else:
    return n * (n-1)//2

S = 0
for k in a_c:
  S += cmb(a_c[k])

for i in range(N):
  print(S - cmb(a_c[A[i]]) + cmb(a_c[A[i]]-1))
import fractions
from functools import reduce

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

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

N = int(input())
A = [int(x) for x in input().split()]
cand = 0
mingcd = gcd_list(A)
if(N<2):
    print(max(A))
else:
    for i in range(N-1):
        if(mingcd==fractions.gcd(A[i],A[i+1])):
            if(i<N-1):
                if(mingcd==fractions.gcd(A[i],A[i+2])):
                    cand = i
                else:
                    cand = i+1
                break
            else:
                if(mingcd==fractions.gcd(A[i],A[i-2])):
                    cand = i
                else:
                    cand = i+1
                break
    print(gcd_list(A[:cand]+A[cand+1:]))


### FIXED CODE ###

import fractions
from functools import reduce

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

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

N = int(input())
A = [int(x) for x in input().split()]
L = [0]*N
R = [0]*N
ans = 0
for i in range(N):
    if(i==0):
        L[i] = A[0]
        R[i] = A[-1]
    else:
        L[i] = gcd(A[i],L[i-1])
        R[i] = gcd(A[-i-1],R[i-1])

for i in range(N):
    if(i==0):
        ans = R[-2]
    elif(i==N-1):
        ans = max(ans,L[-2])
    else:    
        ans = max(ans,gcd(L[i-1],R[-i-2]))
print(ans)
N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
    if ans > 10**18:
        ans = -1
print(ans)

### FIXED CODE ###

A,B=map(int,input().split())
print(A*B)
n,m,q = map(int,input().split())
t=[]
def dfs(s):
  if len(s) == 0:
    t="1"
  else:
    t=s[-1]
  res=[]
  if len(s) == n:
    return [s]
  for i in range(int(t),m+1):
    res+=dfs(s+str(i))
  return res

for i in range(q):
  t.append(list(map(int, input().split())))

ans=0
for i in dfs(""):
  temp=0
  for a,b,c,d in t:
    if int(i[b-1])-int(i[a-1]) == c:
      temp+=d
  ans=max(ans,temp)
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
n,m,q = map(int,input().split())
t=[]
def dfs(l):
  if len(l) == n:
    return [l]

  if len(l) == 0:
    t=1
  else:
    t=l[-1]
  res=[]
  for i in range(t, m+1):
    temp=l+[i]
    for j in dfs(temp):
      res.append(j)
  return res

for i in range(q):
  t.append(list(map(int, input().split())))

ans=0
l=dfs([])
for i in l:
  temp=0
  for a,b,c,d in t:
    if i[b-1]-i[a-1] == c:
      temp+=d
  ans=max(ans,temp)
print(ans)
N, M = map(int, input().split())
list1 = list(map(int, input().split()))
sum = sum(list1)
if N >= sum:
	print(N - sum)
else:
  print('-1')
  


### FIXED CODE ###

R = float(input())
r = R * 2 * 3.14
print(r)
import math
num = int(input())
lst = sorted(list(map(int, input().split())))
result = math.inf
for i in range(lst[0], lst[-1] + 1):
    tmp = 0
    for v in lst:
        tmp += (v - i) ** 2
    if tmp < result:
        result = tmp
print(result)

### FIXED CODE ###

num = int(input())
lst = sorted(list(map(int, input().split())))
result = float('inf')
for i in range(lst[0], lst[-1] + 1):
    tmp = 0
    for v in lst:
        tmp += (v - i) ** 2
    if tmp < result:
        result = tmp
print(result)
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int, input().split()))
    zero_count = 0
    ok = False
    dic = {}
    for a in A:
        if a == 0:
            zero_count += 1
        else:
            if a in dic:
                dic[a] += 1
            else:
                dic[a] = 1
    # print(dic, zero_count)
    if len(dic) == 3:
        if zero_count == 0:
            tmp = list(dic.values())
            # print(tmp)
            if tmp[0] == tmp[1] and tmp[1] == tmp[2]:
                key = list(dic.keys())
                tmp = key[0]
                tmp ^= key[1]
                tmp ^= key[2]
                if tmp == 0:
                    print("Yes")
                    return
    if len(dic) == 1:
        if n%3 == 0:
            if zero_count == N/3:
                print("Yes")
                return
    if zero_count == N:
        print("Yes")
        return
    print("No")




if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    a = list(map(int, input().split()))
    tmp = 0
    for i in range(N):
        tmp ^= a[i]
    if tmp == 0:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()
n, x = map(int, input().split())
xi = list(map(int, input().split()))

import fraction

def gcd(*numbers):
	ret = numbers[0]
	for n in numbers[1:]:
		ret = fraction.gcd(ret, n)
    return ret

xi = map(lambda y:abs(y-x), xi)
print(gcd(*xi))

### FIXED CODE ###

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

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def gcd_l(*numbers):
	ret = numbers[0]
	for n in numbers[1:]:
		ret = gcd(ret, n)
	return ret

xi = map(lambda y:abs(y-x), xi)
print(gcd_l(*xi))
import collections



def XORC(a,b,p):
    for i in range(len(a)):
        if (int(a[i])+int(b[i]))%2 == int(p[i]):
            continue
        else:
            return False
        
    return True
            
def Solve():
    N=int(input())
    AL=[("0"*34+bin(int(x))[2:])[-33:] for x in input().split()]

    ALC=collections.Counter(AL)

    keys=list(ALC.keys())
    vals=list(ALC.values())

    if len(keys)>3:
        return 'No'
    if len(keys)==1:
        if "1" in keys[0]:
            return 'No'
        return 'Yes'
    
    if len(keys)==2:
        if "1" in keys[0] and "1" in keys[1]:
            return 'No'

        stop
        if vals[0]==vals[1]*2 and ("1" not in keys[0]):
            return 'Yes'
        
        if vals[0]*2==vals[1] and ("1" not in keys[1]):
            return 'Yes'
        
        return 'No'
    if len(keys)==3:
        if vals[0]==vals[1]==vals[2]:
            if XORC(keys[0],keys[1],keys[2]) and XORC(keys[0],keys[2],keys[1]) and XORC(keys[1],keys[2],keys[0]):
                return 'Yes'
        
        return 'No'
print(Solve())


### FIXED CODE ###

import collections



def XORC(a,b,p):
    for i in range(len(a)):
        if (int(a[i])+int(b[i]))%2 == int(p[i]):
            continue
        else:
            return False
        
    return True
            
def Solve():
    N=int(input())
    AL=[("0"*34+bin(int(x))[2:])[-33:] for x in input().split()]

    ALC=collections.Counter(AL)

    keys=list(ALC.keys())
    vals=list(ALC.values())

    if len(keys)>3:
        return 'No'
    if len(keys)==1:
        if "1" in keys[0]:
            return 'No'
        return 'Yes'
    
    if len(keys)==2:
        if "1" in keys[0] and "1" in keys[1]:
            return 'No'

        if vals[0]*2==vals[1] and ("1" not in keys[0]):
            return 'Yes'
        
        if vals[0]==vals[1]*2 and ("1" not in keys[1]):
            return 'Yes'
        
        return 'No'
    if len(keys)==3:
        if vals[0]==vals[1]==vals[2]:
            if XORC(keys[0],keys[1],keys[2]) and XORC(keys[0],keys[2],keys[1]) and XORC(keys[1],keys[2],keys[0]):
                return 'Yes'
        
        return 'No'
print(Solve())
p = list(map(int, input().split()))
print(p[0] + p[1] + [2] - max(p))


### FIXED CODE ###

p = list(map(int, input().split()))
print(p[0] + p[1] + p[2] - max(p))
a=[]
while True:
    try:
         h = float(row_input())
         a.append(h)
a.sort()
print a[len(a)-1] - a[0]

### FIXED CODE ###

a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]
A, B, C, K = int(input()), int(input()), int(input()), int(input())

if A >= K:
  print(K)
elif A + B >= K:
  print(A)
else:
  print(A - (K - A - B))

### FIXED CODE ###

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

if A >= K:
  print(K)
elif A + B >= K:
  print(A)
else:
  print(A - (K - A - B))
N=int(input())
A=sorted(map(int,input().split()))

ans=0
dp=[True]*(max(A)+1)
for i in range(N):
    if not dp[A[i]]:
        continue
    if i==N-1:
        ans+=1
    elif i<N-1 and A[i+1]!=A[i]:
        ans+=1
    for j in range(1,max(A)//A[i]+1):
        dp[A[i]*j]=False
print(ans)

### FIXED CODE ###

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

for i in range(5):
    if x[i]==0:
        print(i+1)
        exit()
k = int(input()) 
a,b= map(int,input().split())
ans = "NG"
L = [i in i for range(1,1001) if i%k==0]
for j in range(a,b+1):
    if j in L:
        ans="OK"
print(ans)

### FIXED CODE ###

k = int(input()) 
a,b= map(int,input().split())
ans = "NG"
L = []
for l in range(1,1001):
    if l%k == 0:
        L.append(l)
for j in range(a,b+1):
    if j in L:
        ans="OK"
print(ans)
n, m = map(int, input().split())
now_step = 0
# count=1*a+2*bとなるような、0以上の全てのa,bについて、1をa個、2をb個並べる並べ方を返す.
# [1,(a+b)]からa個を選ぶ選び方と同じ
# ただし、これはnumber-1とnumber-2が分かっている場合は、number-1から1つ、あるいはnumber-2から二つ進む進み方の和で表せる
# よって、counte_steps(number) = count_steps(number-1) + count_steps(number-2)
# 初期値はcount_steps(1) = 1, count_steps(2) = 2,count_steps(0) = 1
checked_steps = {-1:0, 0:1, 1:1}
divide_num = 1000000007 

for i in range(2, n):
    checked_steps[i] = (checked_steps[i-1] + checked_steps[i-2]) % divide_num

all_count = 1
for i in range(m):
    a = int(input())
    if(a < now_step):
        continue
    all_count = (all_count * checked_steps[a - 1 - now_step]) % divide_num
    now_step = a + 1
all_count = (all_count * checked_steps[n - now_step]) % divide_num
print(all_count)

### FIXED CODE ###

n, m = map(int, input().split())
now_step = 0
# count=1*a+2*bとなるような、0以上の全てのa,bについて、1をa個、2をb個並べる並べ方を返す.
# [1,(a+b)]からa個を選ぶ選び方と同じ
# ただし、これはnumber-1とnumber-2が分かっている場合は、number-1から1つ、あるいはnumber-2から二つ進む進み方の和で表せる
# よって、counte_steps(number) = count_steps(number-1) + count_steps(number-2)
# 初期値はcount_steps(1) = 1, count_steps(2) = 2,count_steps(0) = 1
checked_steps = {-1:0, 0:1, 1:1}
divide_num = 1000000007 

for i in range(2, n+1):
    checked_steps[i] = (checked_steps[i-1] + checked_steps[i-2]) % divide_num

all_count = 1
for i in range(m):
    a = int(input())
    if(a < now_step):
        continue
    all_count = (all_count * checked_steps[a - 1 - now_step]) % divide_num
    now_step = a + 1
all_count = (all_count * checked_steps[n - now_step]) % divide_num
print(all_count)
def checkWhichToRead(A, B):
    if len(A) == 0 or A[0] > B[0]:
        return 1
    elif len(B) == 0 or A[0] < B[0]:
        return 0
    else:
        return 2


def searchEqualCase(A, B, K, count):
    if K < 0:
        return count
    ACount = count
    BCount = count
    if len(A) > 0:
        ACount = searchEqualCase(A[1:], B, K - A[0], count + 1)
    if len(B) > 0:
        BCount = searchEqualCase(A, B[1:], K - B[0], count + 1)
    if ACount > BCount:
        return ACount
    else:
        return BCount


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

count = 0
while K >= 0:
    case = checkWhichToRead(A, B)
    if case == 0:
        K -= A[0]
        A = A[1:]
    elif case == 1:
        K -= B[0]
        B = B[1:]
    else:
        count = searchEqualCase(A, B, K, count)
        break
    count += 1
    if count == N + M:
        count += 1
        break

print(count - 1)



### FIXED CODE ###

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

totalA = [0]
totalB = [0]
sumA = 0
for i in range(N):
    sumA += A[i]
    totalA.append(sumA)
sumB = 0
for i in range(M):
    sumB += B[i]
    totalB.append(sumB)

iB = M
countMax = 0
for iA in range(N+1):
  if totalA[iA]>K:
    break
  else:
    while totalA[iA] + totalB[iB] > K:
      iB -= 1
  countMax = max(countMax,iA+iB)

print(countMax)
import math

def least_common_multiple(x,y):
    return int((x * y) / math.gcd(x, y))
    
a,b = map(int,input().split(" "))

print(least_common_multiple(a,b))




### FIXED CODE ###

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

import fractions
def lcm(x, y):
    return (x * y) / fractions.gcd(x,y)
    
print(int(lcm(a, b)))
md=10**9+7
s=input()
dp=[[0]*4 for _ in range(3)]
for c in s:
    if c=="A":dp[0][0]=(dp[0][0]+1)%md
    if c=="B":
        for j in range(2):dp[1][j]=(dp[1][j]+dp[0][j])%md
    if c=="C":
        for j in range(3):dp[2][j]=(dp[2][j]+dp[1][j])%md
    if c=="?":
        for j in range(3):dp[2][j+1]=(dp[2][j+1]+dp[1][j])%md
        for j in range(2):dp[1][j+1]=(dp[1][j+1]+dp[0][j])%md
        dp[0][1] = (dp[0][1] + 1) % md
ans=0
q=s.count("?")
for j in range(4):
    ans+=dp[2][j]*pow(3,q-j,md)
    ans%=md
print(ans)


### FIXED CODE ###

md=10**9+7
s=input()
dp=[[0]*4 for _ in range(3)]
for c in s:
    if c=="A":dp[0][0]=(dp[0][0]+1)%md
    if c=="B":
        for j in range(2):dp[1][j]=(dp[1][j]+dp[0][j])%md
    if c=="C":
        for j in range(3):dp[2][j]=(dp[2][j]+dp[1][j])%md
    if c=="?":
        for j in range(3):dp[2][j+1]=(dp[2][j+1]+dp[1][j])%md
        for j in range(2):dp[1][j+1]=(dp[1][j+1]+dp[0][j])%md
        dp[0][1] = (dp[0][1] + 1) % md
ans=0
q=s.count("?")
for j in range(4):
    if q-j<0:break
    ans+=dp[2][j]*pow(3,q-j,md)
    ans%=md
print(ans)
N=int(input())
R=[list(map(int,input().split())) for n in range(N)]
B=[list(map(int,input().split())) for n in range(N)]

sorted(R,key=itemgetter(1),reverse=True)
B.sort()
ans=0

for c,d in B :
    for a,b in R :
        if a<c and b<d :
            ans+=1
            R.remove([a,b])
            break

print(ans)

### FIXED CODE ###

from operator import itemgetter
N=int(input())
R=[list(map(int,input().split())) for n in range(N)]
B=[list(map(int,input().split())) for n in range(N)]
R.sort(key=itemgetter(1),reverse=True)
B.sort()
ans=0

for c,d in B :
    for a,b in R :
        if a<c and b<d :
            ans+=1
            R.remove([a,b])
            break

print(ans)
N = int(input())
A = [int(input()) for i in range(N)]
def check_num(a,b):
    if b>N+1:
        return -1
    if A[a]==2:
        return b
    else:
        return check_num(int(A[a])-1,b+1)
print(check_num(0,1))

### FIXED CODE ###

n = int(input())
lis = []
for i in range(n):
    lis.append(int(input()))

k = 1
ans = 0
m = 0
while k != 2 and m < n:
    k = lis[k - 1]
    m += 1
if k == 2:
    print(m)
else:
    print("-1")
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools,pdb
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)

N, K = LI()
D = LI()
nums = [i for i in range(0, 10) if i not in D]

"""
使える数字の中で一番低いものから試していく
見つかったら各桁試していく

"""
N = str(N)
ans = []
is_done = False
for n in N:
    if is_done:
        break
    for num in nums:
        if int(n) <= num:
            # このnumを使用する
            ans.append(num)
            break
    else:
        # 超える数字がなかった
        ans = [n + 1, nums[0], nums[0], nums[0], nums[0]]
        is_done = True

for a in ans:
    print(a, end = '')


### FIXED CODE ###

import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools,pdb
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)

N, K = LI()
D = LI()
nums = [str(i) for i in range(0, 10) if i not in D]

"""
使える数字の中で一番低いものから試していく
見つかったら各桁試していく

"""

all_nums = []
for i in range(N, 99999):
    # 全数字の列挙
    all_nums.append(i)
for num in all_nums:
    if num >= N:
        if all(i in nums for i in str(num)):
            print(num)
            exit()
a=int(input())
if a==3 or a==5 or a==7:
  print(YES)
else:
  print(NO)

### FIXED CODE ###

a=int(input())
if a==3 or a==5 or a==7:
  print('YES')
else:
  print('NO')
N,W = map(int, input().split())
weight=[]
values=[]
for idx in range(N):
    w, v = map(int, input().split())
    weight.append(w)
    values.append(v)
dp=[[0]*(W+1) for i in range(N+1)]

for i in range(N):
    for j in range(W):
        if weight[i]<=j+1:
            dp[i+1][j+1] = max(dp[i][j+1-weight[i]]+values[i],dp[i][j+1])
        else:
            dp[i+1][j+1] = dp[i][j+1]

print(dp[N][W])


### FIXED CODE ###

from collections import defaultdict
N,W = map(int, input().split())
wv = [list(map(int,input().split())) for _ in range(N)]

dp = defaultdict(int)
dp[0] = 0
for w, v in wv:
    dp_cur = list(dp.items())
    for w_cur, v_cur in dp_cur:
        if w_cur+w <= W:
            dp[w_cur+w] = max(dp[w_cur+w],v_cur+v)

print(max(dp.values()))
import sys

import numpy as np

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(" ")]

total = 0
ret = 1
n = readInt()
aa = []
for i in range(n):
    v = readInt()
    aa.append(v)
    total += v
    ret = (ret * 3) % 998244353

memo0 = [[-1] * 100000 for _ in range(300)]
def dfs0(i, c):
    if 0 <= memo0[i][c]:
        return memo0[i][c]

    if i == len(aa):
        memo0[i][c] = 3 if total <= (2 * c) else 0
        return memo0[i][c]

    acc = max(0, memo0[i][c])
    acc = (acc + dfs0(i + 1, c)) % 998244353
    acc = (acc + dfs0(i + 1, c)) % 998244353
    acc = (acc + dfs0(i + 1, c + aa[i])) % 998244353
    memo0[i][c] = acc
    return memo0[i][c]

memo1 = [[-1] * 100000 for _ in range(300)]
def dfs1(i, c):
    if 0 <= memo1[i][c]:
        return memo1[i][c]

    if i == len(aa):
        memo1[i][c] = 3 if total == (2 * c) else 0
        return memo1[i][c]

    acc = max(0, memo1[i][c])
    acc = (acc + dfs1(i + 1, c)) % 998244353
    acc = (acc + dfs1(i + 1, c + aa[i])) % 998244353
    return memo1[i][c]

ret = (ret - dfs0(0, 0)) % 998244353
ret = (ret + dfs1(0, 0)) % 998244353
print(ret)

### FIXED CODE ###

import sys
import numpy as np

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(' ')]

a, b, c = readIntN()
minv = min(a, b)
maxv = max(a, b)
ret = 'Yes' if minv < c < maxv else 'No'
print(ret)
N, M = map(int, input().split())
cand = ['*'] * M
mn = ''
for m in range(M):
    s, c = map(int, input().split())
    if s==1 and c==0 and N > 1:
        mn = '-1'

    if cand[s-1] == '*' or cand[s-1] == str(c):
        cand[s-1] = str(c)
    else:
        mn = '-1'
if mn == '-1':
    print (mn)
else:  
    for i in range(N):
        if cand[i]=='*':
            if i==0:
                mn+='1'
            else:
                mn+='0'
        else:
            mn+=cand[i]
    print (mn)

### FIXED CODE ###

N, M = map(int, input().split())
cand = ['*'] * N
mn = ''
for m in range(M):
    s, c = map(int, input().split())
    if s==1 and c==0 and N > 1:
        mn = '-1'

    if cand[s-1] == '*' or cand[s-1] == str(c):
        cand[s-1] = str(c)
    else:
        mn = '-1'
if mn == '-1':
    print (mn)
    exit()

for i in range(N):
    if cand[i]=='*':
        if i==0 and N > 1:
            mn+='1'
        else:
            mn+='0'
    else:
        mn+=cand[i]
print (mn)
n = int(input())

words = []
for i in range(n):
    words.append(input())

ret = "Yes"
if len(set(words)) != n:
    ret = "No"
else:
    for i in range(n-1):
        if words[i][-1] != words[i+1][0]:
            ret = "No"
            break

print(ret)
##17024960 | nowg's solution for [AtCoder-4250] [Problem A]

### FIXED CODE ###

nums = input()

if '2' in nums:
    print("No")
else:
    print("Yes")
#17025159 | nowg's solution for [AtCoder-4250] [Problem A]