Harryxun/stf_run huggingface dataset:
import fractions
from functools import reduce
N,M= [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
#print(n)
n=sorted(set(n),reverse = True)
bs = n[0]
#print(n)
#c=len(n)


def lcm_b(a, b):
        #print("base",a,b)
        return (a * b) // math.gcd(a, b)

def lcm_o():
        global n
        return reduce(lcm_b, n,1)

def chk(v):
        global n
        for i in range(30):
                #print(i,v)
                if v%(2**i) == 1:break
                v = v//2
        t=2**(i-1)
        for j in range(len(n)):
                if n[j] % t == 0 and (n[j] / t) % 2 == 1:
                        n[j] = int(n[j]/t)
                else: return 0
        return i-1
c = chk(n[-1])

if  c != 0:
        #print(n)
        v = lcm_o()*(2**(c-1))
        
        #print(v)
        if v > M:
                print(0) 
        else:
                v = M//v
                #print(v)
                print((v+1)//2 if v%2 == 1 else v//2)
        
else: print(0)

### FIXED CODE ###

import fractions
from functools import reduce
N,M= [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
#print(n)
n=sorted(set(n),reverse = True)
bs = n[0]
#print(n)
#c=len(n)
 
 
def lcm_b(a, b):
        #print("base",a,b)
        return (a * b) // fractions.gcd(a, b)
 
def lcm_o():
        global n
        return reduce(lcm_b, n)
 
def chk(v):
        global n
        for i in range(1,30):
                if v%2 == 1:break
                v = v//2
        t=2**(i-1)
        for j in range(len(n)):
                if n[j] % t == 0 and (n[j] / t) % 2 == 1:
                        n[j] = int(n[j]/t)
                else: return 0
        return i-1
 
if len(n) > 1:
        
        c = chk(n[-1])
        
        if  c != 0:
                v = lcm_o()*(2**(c-1))
                
                if v > M:
                        print(0) 
                else:
                        v = M//v
                        if v%2==1: v+=1
                        print(int(v//2))
        
        else: print(0)
elif len(n)==1:
        v = int(bs*0.5)
        v = M//v
        if v%2==1: v+=1
        print(int(v//2))
from math import log10
import numpy as np

def main(N):
    ans = np.prod(np.array(list(map(int, input().split()))))
    if log10(ans) >= 18:
        print(-1)
    else:
        print(ans)





if __name__ == '__main__':
    N = int(input())
    main(N)

### FIXED CODE ###

def main(N):
    A = list(map(int, input().split()))
    st_A = set(A)
    if 0 in st_A:
        print(0)
    else:
        x = 1
        for a in A:
            x *= a
            if x > 10 ** 18:
                print(-1)
                exit()
        else:
            print(x)





if __name__ == '__main__':
    N = int(input())
    main(N)
'''
Created on Mar 22, 2013

@author: wukc
'''

from numpy import product
from sys import stdin

n=int(stdin.readline())
print(product(range(1,n+1)))

### FIXED CODE ###

'''
Created on Mar 22, 2013

@author: wukc
'''
from sys import stdin

n=int(stdin.readline())
ans=1
for i in range(1,n+1):
    ans*=i
print(ans)
# coding: utf-8

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

alice_time = range(a, b+1)
bob_time = range(c, d+1)
pushed_time = set(alice_time) & set(bob_time)

print(alice_time)
print(bob_time)

if not pushed_time:
  print (pushed_time[0] - pushed_time[-1])

### FIXED CODE ###

# coding: utf-8

a, b, c, d = map(int, input().split())
alice_time = [x for x in range(a, b+1)]
bob_time = [x for x in range(c, d+1)]
pushed_time = set(alice_time) & set(bob_time)

if len(pushed_time) == 0:
  print(0)
else:
  print(len(pushed_time) - 1)
N, K = map(int, input().split())
A = list(map(int, input().split()))
A = [0] + A

L = [[] for _ in range(N)]
L[0] = 1
prev = 1
count = 1
for i in range(1, N):
    now = A[prev]
    if now == 1:
        break
    elif now == prev:
        flag_inf = True
        ans_inf = now
    else:
        L[i] = now
        prev = now
        count += 1
#        print(L)
L = L[:count]
print(L)

if flag_inf:
    print(ans_inf)
else:
    print(L[K%count])

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
A = [0] + A

Root = []
Visited = [0 for _ in range(N+1)]

now = 1
after = A[now]
while Visited[now] == 0:
    Root.append(now)
    Visited[now] = 1
    now = after
    after = A[now]
ind = Root.index(now)
Init = Root[:ind]
Loop = Root[ind:]

if K <= len(Init)-1:
    print(Init[K])
else:
    print(Loop[(K-len(Init))%len(Loop)])
n = int(input())
a=[]
for i in range(n):
    a.append(int(input()))
b=0
for i in range(n):
   b = b + 1/a[i]
b=1/b
print(b)



### FIXED CODE ###

n = int(input())

a=[int(x) for x in input().split()]

b=0
for i in range(n):
   b = b + 1/a[i]
b=1/b
print(b)
number = input(N)
word = list(input((S))
judge = 'Yes'
            
if N%2 == 1:
    print('No')
elif for i in range(N/2 - 1):
    if word[i] != word[N/2+i]:
        judge = 'No'

print(judge)            	
            		


### FIXED CODE ###

number = int(input())
word = list(input())
judge = 'Yes'
            
if number%2 == 1:
	judge = 'No'
    
else:
	for i in range(int(number/2)):
		if word[i] != word[int(number/2 + i)]:
			judge = 'No'

print(judge)
class Cmb:
    def __init__(self, N, mod=998244353):
        self.fact = [1,1]
        self.fact_inv = [1,1]
        self.inv = [0,1]
        
        """ 階乗を保存する配列を作成 """
        for i in range(2, N+1):
            self.fact.append((self.fact[-1]*i) % mod)
            self.inv.append((-self.inv[mod%i] * (mod//i))%mod)
            self.fact_inv.append((self.fact_inv[-1]*self.inv[i])%mod)
    
    """ 関数として使えるように、callで定義 """
    def __call__(self, n, r, mod=10**9+7):
        if (r<0) or (n<r):
            return 0
        r = min(r, n-r)
        return self.fact[n] * self.fact_inv[r] * self.fact_inv[n-r] % mod

n,m,k = map(int,input().split())
mod = 998244353
ans = 0
c = Cmb()
for x in range(k+1):
    if x==0:
        ans += m*pow(m-1, n-1, mod)
        ans %= mod
    else:
        ans += m*pow(m-1, n-1-x, mod)*c(n-1, x)%mod
        ans %= mod
print(ans%mod)

### FIXED CODE ###

class Cmb:
    def __init__(self, N, mod=998244353):
        self.fact = [1,1]
        self.fact_inv = [1,1]
        self.inv = [0,1]
        
        """ 階乗を保存する配列を作成 """
        for i in range(2, N+1):
            self.fact.append((self.fact[-1]*i) % mod)
            self.inv.append((-self.inv[mod%i] * (mod//i))%mod)
            self.fact_inv.append((self.fact_inv[-1]*self.inv[i])%mod)
    
    """ 関数として使えるように、callで定義 """
    def __call__(self, n, r, mod=998244353):
        if (r<0) or (n<r):
            return 0
        r = min(r, n-r)
        return self.fact[n] * self.fact_inv[r] * self.fact_inv[n-r] % mod

n,m,k = map(int,input().split())
mod = 998244353
ans = 0
c = Cmb(N=n, mod=mod)
for x in range(k+1):
    if x==0:
        ans += m*pow(m-1, n-1, mod)
        ans %= mod
    else:
        ans += m*pow(m-1, n-1-x, mod)*c(n-1, x)%mod
        ans %= mod
print(ans%mod)
n = int(input())
alist=list(map(int,input().split()))
print(sum(min(alist[i-1],alist[i],alist[i+1]) for i range(1,n-1))\
      +min(alist[-2],alist[-1])+alist[-1]+min(alist[0],alist[1]))

### FIXED CODE ###

n = int(input())
alist=list(map(int,input().split()))
alist.insert(0,1e7)
alist.append(1e7)
core = 0
for i in range(n):
  core +=min(alist[i],alist[i+1])
print(core)
S=input().split()
L=int(S[0])
R=int(S[1])
list=2018
L1=L
L2=L
while list <> 1:  
  while L2 <= R:
    while L1 < L2:
      if (L1*L2)%2019 <= list:
        list = (L1*L2)%2019
      L1 += 1
    L1 =int(L)
    L2 += 1
print(list)

### FIXED CODE ###

S=[int (i) for i in input().split()]
N=S[0]
A=S[1]
B=S[2]
TRAIN=A*N
BUS=B
if TRAIN > BUS:
  print(BUS)
else:
  print(TRAIN)
import sys
n, m = map(int, input().split())

ans = 0
li = [list(map(int, input().split())) for i in range(m)] 

for i in range(m):
    for j in range(m):
        if (li[i][0] == li[j][0]) and (li[i][1] != li[j][1]):
            print(-1)
            sys.exit()

for i in range(m):
    if (li[i][1] == 0) and (n != 1):
        print(-1)
        sys.exit()
        
if n == 1:
    ans = li[0][1]
    print(ans)

elif n == 2:
    for i in range(m):
        if (li[i][0] == 1):
            ans -= (ans//10)*10
            ans += li[i][1]*10
        else:
            ans -= (ans%10)
            ans += li[i][1]
        
        if ans < 10:
            ans += 10
            
    print(ans)

else:
    for i in range(m):
        if (li[i][0] == 1):
            ans -= (ans//100)*100
            ans += li[i][1]*100
        elif (li[i][0] == 2):
            ans -= ((ans-(ans//100)*100)//10)*10
            ans += li[i][1]*10
        else:
            ans -= (ans%10)
            ans += li[i][1]
            
        if ans < 100:
            ans += 100
            
    print(ans)

    

### FIXED CODE ###

import sys
N, M = map(int, input().split())
li = [-1] * N
for i in range(M):
    s, c = map(int, input().split())
    if li[s-1] == -1 or li[s-1] == c:
        li[s-1] = c
    else:
        print(-1)
        sys.exit()
if N == 1:
    if li[0] == -1:
        ans = 0
    else:
        ans = li[0]
elif N == 2:
    if li[0] == 0:
        print(-1)
        sys.exit()
    else:
        if li[0] == -1:
            li[0] = 1
        if li[1] == -1:
            li[1] = 0
        ans = li[0]*10 + li[1]
else:
    if li[0] == 0:
        print(-1)
        sys.exit()
    else:
        if li[0] == -1:
            li[0] = 1
        if li[1] == -1:
            li[1] = 0
        if li[2] == -1:
            li[2] = 0
        ans = li[0]*100 + li[1]*10 + li[2]
print(ans)
N = int(input()) #目的
A = int(input()) #1円の枚数

#500円で払える箇所まで割る
amari = N % 500
"print(int(amari))


if amari <= A:
  print("Yes")
else:
  print("No")

### FIXED CODE ###


N = int(input()) #目的
A = int(input()) #1円の枚数

#500円で払える箇所まで割る
amari = N % 500
#print(int(amari))


if amari <= A:
  print("Yes")
else:
  print("No")
c = 0
for i in range(1, N+1):
  if i % 2 == 1:
    c+=1

print(c/N)




### FIXED CODE ###

N = int(input())
c = 0
for i in range(1, N+1):
  if i % 2 == 1:
    c+=1

print(c/N)
n, t = map(int, raw_input().split())

stores = []
for i in xrange(n):
    a, b = map(int, raw_input().split())
    stores.append((a, b))

def mycmp(s1, s2):
    a1, b1 = s1
    a2, b2 = s2
    v1 = a2 + a2 * b1
    v2 = a1 + a1 * b2
    return cmp(v1, v2)

stores.sort(cmp=mycmp)

def multi(s1, s2):
    a1, b1 = s1
    a2, b2 = s2

    a3 = a1 + a2 + a1 * a2
    b3 = b1 + 1 + a2 * b1 + a2 + b2
    return (a3, b3)

rev = stores[:]
for i in xrange(n - 2, -1, -1):
    rev[i] = multi(rev[i], rev[i + 1])

cnt = 0
tick = 1
ptr = 0
res = 0
while tick <= t and ptr < n:
    l, r = ptr, n
    while l <= r:
        m = (l + r) >> 1
        (a, b) = rev[m]
        u = a * tick + b
        #print tick, u, tick + u
        if tick + u <= t:
            res = max(res, ptr + n - m)
            r = m - 1
        else:
            l = m + 1

    (a, b) = stores[ptr]
    #print (a, b)
    ptr += 1

    tt = a * tick + b
    if tick + tt > t:
        break
    tick += tt + 1
    #print tick, t, a, b, ptr, n
print res



### FIXED CODE ###

INF = 10 ** 10
N = 100
n, T = map(int, raw_input().split())

stores = []
zs = []
for i in xrange(n):
    a, b = map(int, raw_input().split())
    if a == 0:
        zs.append(b)
    else:
        stores.append((a, b))

def mycmp(s1, s2):
    a1, b1 = s1
    a2, b2 = s2
    v1 = a2 + a2 * b1
    v2 = a1 + a1 * b2
    return cmp(v1, v2)

stores.sort(cmp=mycmp)
stores.append((INF, INF))
zs.sort()

m = len(zs)

for i in xrange(1, m):
    zs[i] += zs[i - 1]

dp = [ [INF for i in xrange(N)] for j in xrange(2) ]
dp[0][0] = 0
res = 0

n = len(stores)

p = 0
for i in xrange(n):
    q = p ^ 1
    dp[q] = [INF for j in xrange(N)]

    a, b = stores[i]
    for j in xrange(N):
        dp[q][j] = min(dp[q][j], dp[p][j])
        if dp[p][j] == -INF:
            continue
        if j + 1 < N:
            t = dp[p][j] + 1
            dp[q][j + 1] = min(dp[q][j + 1], dp[p][j] + 1 + a * t + b)
            if dp[q][j + 1] <= T:
                res = max(res, j + 1)
    for j in xrange(N):
        if dp[q][j] > T:
            continue
        rem = T - dp[q][j] - 1
        l, r = 0, m - 1
        while l <= r:
            mid = (l + r) / 2
            if zs[mid] + mid <= rem:
                res = max(res, j + mid + 1)
                l = mid + 1
            else:
                r = mid - 1
    p = q
print res
N, K = map(int, input().split())
menu = []

for i in range(N):
    t, d = map(int, input().split())
    menu.append((t, d))

sorted(menu, key = lambda x:x[1], reverse=True)
neta = set()
duplicates = []

for m in menu[:K]:
    if m[0] in neta:
        duplicates.append(m[1])
    else:
        neta.add(m[0])

p = sum([d for (t, d) in menu[:K]]) + len(neta)**2
ans = p

for m in menu[K:]:
    if m[0] not in neta:
        neta.add(m[0])
        duplicate = duplicates.pop()
        
        p += (m[1] - duplicate) + 2 * len(neta) - 1 
        #print(ans, p)
        ans = max(ans, p)

print(ans)  

### FIXED CODE ###

N, K = map(int, input().split())
menu_ = []

for i in range(N):
    t, d = map(int, input().split())
    menu_.append((t, d))

menu = sorted(menu_, key = lambda x:x[1], reverse=True)
neta = set()
duplicates = []

for m in menu[:K]:
    if m[0] in neta:
        duplicates.append(m[1])
    else:
        neta.add(m[0])

p = sum([d for (t, d) in menu[:K]]) + len(neta)**2
ans = p

for m in menu[K:]:
    if m[0] not in neta and duplicates:
        neta.add(m[0])
        duplicate = duplicates.pop()
        
        p += (m[1] - duplicate) + 2 * len(neta) - 1 
        #print(ans, p)
        ans = max(ans, p)

print(ans)
import sys
s = sys.stdin.readline()
if s = 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')

### FIXED CODE ###

s = input()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')
len=input()
#len-1
Narray=sorted(input().split())
n=0
while True
	if not Narray[n] == Narray[n+1]:
    	pass
    elif:
      print("NO")
print("yes")
    	
  

### FIXED CODE ###

length=input()
#len-1
Narray=sorted(input().split())
n=0
while n<int(length)-1:
	if Narray[n] == Narray[n+1]:
		print("NO")
		break
	elif n==int(length)-2:
		print("YES")
		break
	else:
		n+=1
a,b=input().split()
test = lambda x:int(x)
a=test(a)
b=test(b)

w=[int(input()) for i in range(a)]
w.sort()
sum=0
num=len(w)
for i in w:
    sum=sum+i
while b-sum>=w[0]:
    sum=sum+w[0]
    num=num+1
    
print(num)

### FIXED CODE ###

print(700+100*(input().count('o')))
import numpy as np
sList, tList = input(), input()
dp = np.zeros((len(sList)+1, len(tList)+1), dtype=np.int16)


# 横方向で回す
for i, s in enumerate(sList, start=1):
    for j, t in enumerate(tList, start=1):
        dp[i][j] = np.max([dp[i][j - 1], dp[i-1][j],
                           dp[i-1][j-1] + 1 if s == t else 0])
m = dp[i][j]
ans = ""
# traceback
cnt = 0
while i + j != 0:
    if dp[i - 1][j - 1] == m - 1 and tList[j-1] == sList[i-1]:
        ans = tList[j-1] + ans
        i -= 1
        j -= 1
        m -= 1
    else:
        if dp[i - 1][j] == m:
            i -= 1
        elif dp[i][j-1] == m:
            j -= 1
    cnt += 1
print(ans)


### FIXED CODE ###


sList, tList = input(), input()

dp = [[0] * (len(tList) + 1) for _ in range(len(sList)+1)]


# 横方向で回す
for i, s in enumerate(sList, start=1):
    for j, t in enumerate(tList, start=1):
        dp[i][j] = max([dp[i][j - 1], dp[i-1][j],
                        dp[i-1][j-1] + 1 if s == t else 0])
m = dp[i][j]
ans = ""
# traceback
cnt = 0
while i + j != 0:
    if dp[i - 1][j - 1] == m - 1 and tList[j-1] == sList[i-1]:
        ans = tList[j-1] + ans
        i -= 1
        j -= 1
        m -= 1
    else:
        if dp[i - 1][j] == m:
            i -= 1
        elif dp[i][j-1] == m:
            j -= 1
    cnt += 1
print(ans)
from fractions import gcd
from functools import reduce

lcm = lambda a, b: b // lcm(a, b) * a
mod = 10 ** 9 + 7

N, *A = map(int, open(0).read().split())

L = reduce(lcm, A) % mod
print(sum(L * pow(a, mod - 2, mod) % mod for a in A) % mod)

### FIXED CODE ###

from fractions import gcd
from functools import reduce

def main():
    lcm = lambda a, b: a * b // gcd(a, b)
    mod = 10 ** 9 + 7

    N, *A = map(int, open(0).read().split())

    L = reduce(lcm, A)
    print(sum(L // a for a in A) % mod)

main()
n,m = list(map(int, input().split()))
x = []
ans = [0]*m
answ = 0
s,c = [], []

def has_duplicates(seq):
    return len(seq) != len(set(seq))

for i in range(m):
  x.append(list(map(int,input().split())))
  
#重複を取り除く
x = list(map(list, set(map(tuple, x))))

for i,j in x:
  s.append(i)
  c.append(j)
  
#sに重複があれば－１を出力
if m == 0:
  print(-1)
elif has_duplicates(s):
  print(-1)
else:
  for i,j in x:
    ans[i-1] = j
    
  for i in range(len(ans)):
    answ += ans[i]*(10**(m-1-i))

    if ans[0] != 0:
      print(answ)
    else:
      print(-1)

### FIXED CODE ###

n,m = list(map(int, input().split()))
x = []
ans = [0]*n
answ = 0
s,c = [], []

def has_duplicates(seq):
    return len(seq) != len(set(seq))

for i in range(m):
  x.append(list(map(int,input().split())))
  
#重複を取り除く
x = list(map(list, set(map(tuple, x))))

for i,j in x:
  s.append(i)
  c.append(j)

if (n == 1) and (m == 0):
  print(0)
elif m == 0:
  ans[0] = 1
  for i in range(len(ans)):
    answ += ans[i]*(10**(n-1-i))
    
  print(answ)
elif has_duplicates(s):
  print(-1)
elif (n == 1) and (c.count(0) == 1):
  print(0)
else:
  for i,j in x:
    ans[i-1] = j
    
  if (ans[0] == 0) and (s.count(1) == 0):
    ans[0] = 1
    
  for i in range(len(ans)):
    answ += ans[i]*(10**(n-1-i))

  if ans[0] == 0:
    print(-1)
  else:
    print(answ)
S,T = input("Enter the color").split()
A,B = int(input("Enter the number").split())
U = int(input("Color you want"))
if U==S:
  print(A-=1)
else:
  print(B-=1)

### FIXED CODE ###

S,T = input().split(" ")
A,B = map(int,input().split(" "))
U = input()
if S==U:
  A-=1
else:
  B-=1
print("{} {}".format(A,B))
N, M, Q = map(int, input().split())
LR = []
for i in range(M):
    l, r = map(int, input().split())
    LR.append([l-1, r])
PQ = []
for i in range(Q):
    p, q = map(int, input().split())
    PQ.append([p-1, q-1])


import numpy as np
ar = np.zeros([M, N])
for m in range(M):
    ar[m, LR[m][0]:LR[m][1]] = 1

for q in range(Q):
    left = PQ[q][0]
    right = PQ[q][1]
    if left != 0 and right!=9:
        flag = (ar[:, left-1] == 0)* (ar[:, right+1] == 0) * (ar[:, left:right+1].max(axis=1) > 0)
        print(sum(flag))
    elif left == 0 and right!=9:
        flag = (ar[:, right+1] == 0) * (ar[:, left:right+1].max(axis=1) > 0)
        print(sum(flag))
    elif left != 0 and right==9:
        flag = (ar[:, left-1] == 0) * (ar[:, left:right+1].max(axis=1) > 0)
        print(sum(flag))
    else:
        print(M)


### FIXED CODE ###

import numpy as np
N, M, Q = map(int, input().split())
LR = []
for i in range(M):
    l, r = map(int, input().split())
    LR.append([l, r])
PQ = []
for i in range(Q):
    p, q = map(int, input().split())
    PQ.append([p, q])
ar_sec = np.zeros([N, N])
for i in range(M):
    l, r = LR[i][0], LR[i][1]
    ar_sec[l-1][r-1] += 1


ar_sum = np.zeros([N+1, N+1])
for i in range(N):
    for j in range(N):
        ar_sum[i+1][j+1] = ar_sum[i][j+1]+ar_sum[i+1][j]-ar_sum[i][j]+ar_sec[i][j]

for i in range(Q):
    p, q = PQ[i][0], PQ[i][1]
    print(int(ar_sum[q][q]-ar_sum[p-1][q]))
N=int(input()):
cnt=0
for i in range(1,N+1):
  if i%3==0:
    continue
  if i%5==0:
    continue
  if i%15==0:
    continue
  else:
    cnt+=i
print(cnt)

### FIXED CODE ###

N=int(input())
cnt=0
for i in range(1,N+1):
  if i%3==0:
    continue
  if i%5==0:
    continue
  if i%15==0:
    continue
  else:
    cnt+=i
print(cnt)
import math
A,B = map(float,input().split())
A = int(A)
if A == 0 or B == 0 :
    print(0)
else:
    ans = A*B
    i = math.floor(ans)-1
    while True : 
        if i <= ans and i+1 > ans:
            print(i)
            sys.exit(0)
        i += 1

### FIXED CODE ###

from decimal import Decimal
A, B = map(Decimal, input().split())
print(int(A * B))
# -*- coding: utf-8 -*-
n=raw_input()
k=raw_input()
ans=n%k
if ans==0:
    print"0"
else:
    print"1"


### FIXED CODE ###

# -*- coding: utf-8 -*-
n=raw_input().split()
ina=int(n[0])
ika=int(n[1])
ans=ina%ika
if ans==0:
    print"0"
else:
    print"1"
def main():
	N = int(input())
	seq = list(map(int, input().split()))
	maks = 0
	for i in range(0, N):
		for j in range(i, N):
			maks = max(abs(seq[j] - seq[i]), maks)
	print(maks)
	return 0
main()

### FIXED CODE ###

def main():
	N = int(input())
	if N % 2:
		print(2 * N)
	else:
		print(N)
	return 0
main()
# coding: utf-8

import collections

def dfs(i):
    if visited[i] == 1:
        return
    visited[i] = 1
    for j in speakers[i]:
        for k in langs[j]:
            dfs(k)


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

langs = collections.defaultdict(list)
speakers = [[] for _ in range(N)]

for i in range(N):
    ls = list(map(int, input().split()))
    for j in range(1, ls[0] + 1):
        langs[ls[j]-1].append(i)
        speakers[i].append(ls[j]-1)

visited = [0] * N
dfs(0)

if 0 not in visited:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

# coding: utf-8

import collections
import sys
sys.setrecursionlimit(100000)

def dfs(i):
    if visited[i] == 1:
        return
    visited[i] = 1
    for j in speakers[i]:
        if used_lang[j] == 1:
            continue
        used_lang[j] = 1
        for k in langs[j]:
            dfs(k)


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

langs = collections.defaultdict(list)
speakers = [[] for _ in range(N)]

for i in range(N):
    ls = list(map(int, input().split()))
    for j in range(1, ls[0] + 1):
        langs[ls[j]-1].append(i)
        speakers[i].append(ls[j]-1)

visited = [0] * N
used_lang = [0] * M
dfs(0)

if 0 not in visited:
    print("YES")
else:
    print("NO")
k = input()
n = 'keyence'
for i in range(len(k)):
    if k[i] == 'k':
        z = 0
        for j in range(len(n)):
            if k[i+j] != n[j]:
                z = 1
                for p in range(i+j, len(k)):
                    
                    if n[j:] in k[p:]:
                        break
                        break
                    else:
                        z = 2
                        break
            break
            
    if i == len(k):
        z = 2
    

if z == 0 or z == 1:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

S = input()
keyence = 'keyence'
n = False
for i in range(len(S) + 1):
    for j in range(i, len(S) + 1):
        rest_str = S[:i] + S[j:]
        if rest_str == keyence:
            n = True
            break
    if n:
        break
if n:
	print("YES")
else:
    print("NO")
a,b = map(int,input().split())
c = (a * b) % 2
if c == 1 :
  print(odd)
else :
  print(even)


### FIXED CODE ###

a,b = map(int,input().split())
c = (a * b) % 2
if c == 1 :
  print("Odd")
else :
  print("Even")
l = list(map(int,input().split()))
l.sort()
if (l[0]==l[1] and l[1]) != l[2] or (l[0] != l[1] and l[1]==l[2]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

l = list(map(int,input().split()))
l.sort()
if (l[0]==l[1] and l[1] != l[2]) or (l[0] != l[1] and l[1]==l[2]):
  print('Yes')
else:
  print('No')
a, b = map(int, input().split())

#x = a // b

#y = a % b

#z = a / b

print("{%d} {%d} {%f}".format(a//b, a%b,a/b))



### FIXED CODE ###

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

print("%d %d %f" % (a//b, a%b, a/b))
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=[0]
for i in range(n):
  d.append(d[-1]+l[i])
  if d[-1]>x:
    print(len(d)-1)
     break
  if i==n-1:
    print(n+1)

### FIXED CODE ###

n,x=map(int,input().split())
l=list(map(int,input().split()))
d=[0]
for i in range(n):
  d.append(d[-1]+l[i])
  if d[-1]>x:
    print(len(d)-1)
    break
  if i==n-1:
    print(n+1)
a=int(input())
if(0<a%100<13):
  if(0<a//100<13):
    print("AMBIGUOUS")
  else:
    print("MMYY")
  else:
    if(0<a//100<13):
      print("YYMM")
    else:
      print("NA")

### FIXED CODE ###

a=int(input())
if(0<a%100<13):
  if(0<a//100<13):
    print("AMBIGUOUS")
  else:
    print("YYMM")
else:
    if(0<a//100<13):
      print("MMYY")
    else:
      print("NA")
from math import ceil

n, x, t = [int(v) for v in input().split(" ")]


print(ceil(n / x) * t)

### FIXED CODE ###

n = input()

s = sum([int(v) for v in n.split()])

if s % 9 == 0:
    print('Yes')
else:
    print('No')