Harryxun/stf_run huggingface dataset:
r = int(input())
g = int(input())
b = int(input())


s = 100*r+10*b+g

if s%4 == 0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

r, g, b = (int(x) for x in input().split())


s = 100*r+10*g+b

if s%4 == 0:
    print("YES")
else:
    print("NO")
n1, n2, n3 = list(map(int, input().split()))
print((n1-n2+1)*(n1-n3+1))

### FIXED CODE ###

n1=int(input())
n2=int(input())
n3=int(input())
out=(n1-n2+1)*(n1-n3+1)
print(out)
n = 4
 input_list = []
 for i in range(4):
     input_list.append(int(input()))

N = input_list[0]
K = input_list[1]
X = input_list[2]
Y = input_list[3]

if N > K :
    result = K * X + (N-K) * Y
else:
    result = K * X

print ( result )

### FIXED CODE ###

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

N = input_list[0]
K = input_list[1]
X = input_list[2]
Y = input_list[3]

if N > K :
    result = K * X + (N-K) * Y
else:
    result = N * X

print ( result )
#!/usr/bin/env python
import math

chebyshev = []

n = int(input())

x = input().split()
y = input().split()

for i in range(n):
    x[i] = int(x[i])
for i in range(n):
    y[i] = int(y[i])

for p in range(3):
    total = 0
    for i in range(n):
        total += (math.fabs(x[i]-y[i]))**(p+1)
    distance = total**(1/(p+1))
    print("%.5f" % distance)

for i in range(n):
    chebyshev.append(math.abs(x[i]-y[i]))
print("%.5f" % max(chebyshev))

### FIXED CODE ###

#!/usr/bin/env python
import math

chebyshev = []

n = int(input())

x = input().split()
y = input().split()

for i in range(n):
    x[i] = int(x[i])
for i in range(n):
    y[i] = int(y[i])

for p in range(3):
    total = 0
    for i in range(n):
        total += (math.fabs(x[i]-y[i]))**(p+1)
    distance = total**(1/(p+1))
    print("%.5f" % distance)

for i in range(n):
    chebyshev.append(math.fabs(x[i]-y[i]))
print("%.5f" % max(chebyshev))
from numba import njit

@njit(cache = True)
def dis(a, b):
  d = 0
  for ai, bi in zip(a, b):
    if ai == bi:
      continue
      d += 1
      return d

@njit
def main():
    s = list(input())
    t = list(input())
    lt = len(t)
    ls = len(s)
    ans = 1000

    for i in prange(ls-lt+1):
        ans = min(ans, dis(s[i:i+lt], t))
    
    print(ans)
        
    

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    s = list(input())
    t = list(input())
    lt = len(t)
    ls = len(s)
    ans = 1000
    
    
    def dis(a, b):
        d = 0
        for ai, bi in zip(a, b):
            if ai == bi:
                continue
            d += 1
        return d
    
    for i in range(ls-lt+1):
        ans = min(ans, dis(s[i:i+lt], t))
    
    print(ans)
        
    

if __name__ == "__main__":
    main()
n=int(input())
a=list(map(int,input().split()))
ans=[0 for i in range(10000)]
for i in range(n):
    ans[a[i]-1]+=1
tmp=0
for i in range(10000):
    tt=(i+1)*ans[i]
    tmp+=tt
q=int(input())
for i in range(q):
    b,c=map(int,input().split())
    tt=-ans[b-1]*b+ans[b-1]*c
    ans[c-1]+=ans[b-1]
    ans[b-1]=0
    tmp+=tt
    print(tmp)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans=[0 for i in range(100001)]
for i in range(n):
    ans[a[i]-1]+=1
tmp=0
for i in range(100001):
    tt=(i+1)*ans[i]
    tmp+=tt
q=int(input())
for i in range(q):
    b,c=map(int,input().split())
    tt=-ans[b-1]*b+ans[b-1]*c
    ans[c-1]+=ans[b-1]
    ans[b-1]=0
    tmp+=tt
    print(tmp)
print(d)


### FIXED CODE ###

N, M = map(int, input().split())
X = sorted([int(i) for i in input().split()])
d = sorted([X[i] - X[i-1] for i in range(1, M)])
ans = 0
c = 0
for i in d:
    if c > M - N - 1:
        break
    ans += i
    c += 1
print(ans)
def main():
    A,B,C,D=input().split()
    A=int(A)
    B=int(B)
    C=int(C)
    D=int(D)
    if A%C!=0:
        C_min=A-A%C+C
    else:
        C_min=A
    C_max=B-B%C
    if A%D!=0:
        D_min=A-A%D+D
    else:
        D_min=A
    D_max=B-B%D
    if A%(C*D/gcd(C,D))!=0:
        CD_min=A-A%(C*D/gcd(C,D))+(C*D/gcd(C,D))
    else:
        CD_min=A
    CD_max=B-B%(C*D/gcd(C,D))
    C_sum=(C_max-C_min)/C+1
    D_sum=(D_max-D_min)/D+1
    CD_sum=(CD_max-CD_min)/(C*D/gcd(C,D))+1
    sum= B-A+1-int(C_sum+D_sum-CD_sum)
    return sum

print(main())

### FIXED CODE ###

def gcd(a,b):
    if a < b:
        a, b = b, a
    while a % b != 0:
        a, b = b, a % b
    return b
def main():
    A,B,C,D=map(int,input().split())
    if A%C!=0:
        C_min=A-A%C+C
    else:
        C_min=A
    C_max=B-B%C
    if A%D!=0:
        D_min=A-A%D+D
    else:
        D_min=A
    D_max=B-B%D
    mod=C*D//gcd(C,D)
    if A%mod!=0:
        CD_min=A-A%mod+mod
    else:
        CD_min=A
    CD_max=B-B%mod
    C_sum=(C_max-C_min)//C
    D_sum=(D_max-D_min)//D
    CD_sum=(CD_max-CD_min)//mod
    sum= B-A+1-int(C_sum+D_sum-CD_sum+1)
    return sum
print(int(main()))
import bisect
import sys
input = sys.stdin.readline
a, b, q = map(int, input().split())
INF = 10 ** 18
s = [-INF] + [int(input()) for i in range(a)] + [INF]
t = [-INF] + [int(input()) for i in range(b)] + [INF]
ans = []
for i in range(q):
    x = int(input())
    idxs = bisect.bisect(s, x)
    idxt = bisect.bisect(t, x)
    ans.append(min(x - min(s[idxs - 1], t[idxt -1]),
                     x - s[idxs - 1] + (t[idxt] - s[idxs - 1]),
                     t[idxt] - x + (t[idxt] - s[idxs - 1]),
                     x - t[idxt - 1] + (s[idxs] - t[idxt - 1]),
                     s[idxs] - x + (s[idxs] - t[idxt - 1]),
                     max(s[idxs], t[idxt]) - x,
                     min(x - min(s[idxs - 1], t[idxt -1]))
for i in range(q):
    print(ans[i])





### FIXED CODE ###

import bisect

a, b, q = map(int, input().split())
INF = 10 ** 18
s = [-INF] + [int(input()) for i in range(a)] + [INF]
t = [-INF] + [int(input()) for i in range(b)] + [INF]
ans = []
for i in range(q):
    x = int(input())
    idxs = bisect.bisect(s, x)
    idxt = bisect.bisect(t, x)
    lis = []
    lis.append(x - min(s[idxs - 1], t[idxt -1]))
    lis.append(x - s[idxs - 1] + (t[idxt] - s[idxs - 1]))
    lis.append(t[idxt] - x + (t[idxt] - s[idxs - 1]))
    lis.append(x - t[idxt - 1] + (s[idxs] - t[idxt - 1]))
    lis.append(s[idxs] - x + (s[idxs] - t[idxt - 1]))
    lis.append(max(s[idxs], t[idxt]) - x)
    ans.append(min(lis))
for i in range(q):
    print(ans[i])
import sys
def input(): return sys.stdin.readline().strip()
def prime_factors(n):
    i = 2
    factors = {}
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            if i in factors.keys():
                factors[i] += 1
            else:
                factors[i] = 1
    if n > 1:
        if n in factors.keys():
            factors[n] += 1
        else:
            factors[n] = 1
    return factors

i  = lambda: int(input())

N = i()

pfd = prime_factors(N)

check_num = []

for pf in pfd.keys():
    tmp_num = []
    for i in range(1, pfd[pf] + 1):
        tmp_num.append(pf ** i)
        for n in check_num:
            tmp_num.append(n * (pf ** i))
    check_num += tmp_num

count = 0
for n in check_num:
    if N // (n-1) == N % (n-1):
        count += n-1

print(count)

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())

M, N = mi()

print(M-N+1)
N,M = map(int(),input().split())
 
if N == M:
  print('Yes')
  
else:
  print('No')


### FIXED CODE ###

N,M = input().split()
if N == M:
  print('Yes')
else:
  print('No')
s, t = input()
print(s + t)


### FIXED CODE ###

s, t = map(str, input().split()) 
print(t + s)
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H, W = lr()
A = np.array([lr() for _ in range(H)])
B = np.array([lr() for _ in range(H)])
diff = np.abs(A - B)
dp = np.array([[np.zeros(80*3) for _ in range(W)] for _ in range(H)], np.bool)
start = 80*3//2
begin = diff[0][0]
dp[0][0][start+begin] = True
dp[0][0][start-begin] = True
for i in range(H):
    for j in range(W):
        d = diff[i][j]
        if i > 0:
            dp[i][j][d:] = np.logical_or(dp[i][j][d:], dp[i-1][j][:-d])
            dp[i][j][:-d] = np.logical_or(dp[i][j][:-d], dp[i-1][j][d:])
        if j > 0:
            dp[i][j][d:] = np.logical_or(dp[i][j][d:], dp[i][j-1][:-d])
            dp[i][j][:-d] = np.logical_or(dp[i][j][:-d], dp[i][j-1][d:])

result = dp[H-1][W-1][start:]
answer = np.where(result==True)[0].min()
print(answer)
# 44


### FIXED CODE ###

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H, W = lr()
A = [lr() for _ in range(H)]
B = [lr() for _ in range(H)]
diff = [[0] * W for _ in range(H)]
for i in range(H):
    for j in range(W):
        diff[i][j] = abs(A[i][j] - B[i][j])

X = (H+W) * 80
L = X + X + 1 #真ん中を0とする、最後に-X
dp = [[None] * W for _ in range(H)]
dp[0][0] = np.zeros(L, np.bool)
dp[0][0][X+diff[0][0]] = 1; dp[0][0][X-diff[0][0]] = 1 #非負整数のみでも良い
for h in range(H):
    for w, di in enumerate(diff[h]):
        if h == 0 and w == 0:
            continue
        x = np.zeros(L, np.bool)
        if h > 0:
            x[di:] |= dp[h-1][w][:L-di]
            x[:L-di] |= dp[h-1][w][di:]
        if w > 0:
            x[di:] |= dp[h][w-1][:L-di]
            x[:L-di] |= dp[h][w-1][di:]
        dp[h][w] = x

dp = dp[-1][-1]
possible = np.where(dp)[0] - X
answer = np.abs(possible).min()
print(answer)
# 07
N,M=map(int,input().split())
A=[-1]*N
L=[]
for j in range(M):
  L.append(list(map(int,input().split())))
for i in range(M):
  if A[L[M][0]-1]==-1 or A[L[M][0]-1]==L[M][1]:
    A[L[M][0]-1]==L[M][1]
  else:
    print(-1)
    exit()
S=""
if N!=1 and A[0]==0:
  print(-1)
  exit()
for k in range(N):
  if A[k]==-1:
    if N!=1 and k==0:
      A[k]=1
    else:
      A[k]=0
  S+=str(A[i])
print(int(S))
  


### FIXED CODE ###

n,m = map(int,input().split())
s = list(list(map(int,input().split())) for i in range(m))
x = [-1]*n
b = True
for i in range(m):
    if x[s[i][0]-1] == -1 or x[s[i][0]-1] == s[i][1]:
        x[s[i][0]-1] = s[i][1]
    else:
        b = False
for j in range(n):
    if x[j] == -1:
        if len(x) != 1 and j == 0:
            x[j] = 1
        else:
            x[j] = 0
if len(x) != 1 and x[0] == 0:
    b = False

if b:
  S=""
  for o in range(n):
    S+=str(x[o])
  print(int(S))
else:
  print(-1)
#!/usr/bin/env python3
N, M = map(int, input().split())

n = {}
exs = {}

for i in range(M):
    n[i+1] = 0
    exs[i+1]=0

f = True

for i in range(M):
    s, c = map(int, input().split())
    exs[s] += 1
    if exs[s] == 1 or c==n[s]:
        n[s] = c
    else:
        f = False
        break
ans = ''
if f:
    for k,v in n.items():
        ans += str(v)
else:
    print(-1)
    exit()

if int(ans) > 0:
    print(ans)
else:
    print(-1)





### FIXED CODE ###

#!/usr/bin/env python3

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


sc = []
for i in range(M):
    s, c = map(int, input().split())
    sc.append([s,c])


sc = sorted(sc)
if N == 1: start = 0
else: start = 10 ** (N-1)
end = 10 ** N

ans = -1
for i in range(start, end):
    si = str(i)
    f = True
    for j in range(M):
        if si[sc[j][0]-1] != str(sc[j][1]):
            f = False
            break
    if f:
        ans = i
        break

    
print(ans)
n,k=map(int,input().split())
s=input()

X=[]
cnt=0
if len(s)>=2:
    for i in range(n-1):
        cnt+=1
        if s[i]=='0' and s[i+1]=='1':
            X.append(cnt)
            cnt=0
        elif s[i]=='1' and s[i+1]=='0':
            X.append(cnt)
            cnt=0
        elif i==n-2:
            X.append(cnt)
    
    if s[-1]!=s[-2]:
        X.append(1)
    else:
        X[-1]+=1
else:
    X=[s]


if s[0]=='1':
    if k>=len(X[1::2]):
        print(n)
    else:
        z=X[1::2]
        o=X[::2]
        ans=sum(o[:k+1])+sum(z[:k])
        for i in range(len(z)-k):
            ans=max(ans,ans-z[i]-o[i]+z[i+k]+o[i+k+1])
        print(ans)
else:
    if k>=len(X[0::2]):
        print(n)
    else:
        z=X[::2]
        o=X[1::2]
        ans=sum(z[:k])+sum(o[:k])
        for i in range(len(o)-k):
            ans=max(ans,ans-o[i]-z[i]+o[i+k]+z[i+k+1])
        print(ans)

### FIXED CODE ###


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

I=[0]

for i in range(n-1):
    if s[i]!=s[i+1]:
        I.append(i+1)
        
r=len(I)

for _ in range(10**6):
        I.append(n)

X=[]

for i in range(r):
    if s[I[i]]=='0':
        X.append(I[i+2*k]-I[i])
    else:
        X.append(I[i+2*k+1]-I[i])

print(max(X))
A = input()

lst_A = list(A)

lst_A.sort()

ans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])

print(ans)

### FIXED CODE ###


lst_A = input().split()

lst_A.sort()

ans = int(lst_A[2]) * 10 + int(lst_A[0]) + int(lst_A[1])

print(ans)
print int(a * b)

### FIXED CODE ###

a,b=map(int,input().split())
print (a * b,(a + b) * 2)
from scipy.sparse import*;f=lambda*z:map(int,raw_input().split());d=lambda s:csgraph.dijkstra(csr_matrix(([1]*n,(a,b)),[n+1]*2),0,s);n,=f();a,b=zip(*map(f,[0]*n));g=d(1);h=d(n);print['Snuke','Fennec'][sum(g[i]>h[i]for i in range(n+1))*2<n]

### FIXED CODE ###

from scipy.sparse import*
f=lambda*z:map(int,raw_input().split())
d=lambda s:csgraph.dijkstra(csr_matrix(([1]*len(a),(a,b)),[n+1]*2),0,s)
n,=f()
a,b=zip(*map(f,[0]*~-n))
g=d(1)
h=d(n)
print 'Snuke'if sum(g[i]>h[i] for i in range(n+1))*2>=n else'Fennec'
import sys


P = sys.argv[1]
Q = sys.argv[2]
R = sys.argv[3]




numbers = [P,Q,R]

combinations = ['_','_','_']

numbers = []

a1 = P + Q.
a2 = P + R
a3 = Q + R

value = 300 


 
if __name__ == '__main__': 
    if a1 < value:
        value = a1 
    if value < a2:
        value = a2
    if value < a3:
        value = a3 
    return value 
 

### FIXED CODE ###

P,Q,R = map(int,input().split())
a1 = P + Q
a2 = P + R
a3 = Q + R
value = 300
if a1 < value:
    value = a1
if value > a2:
    value = a2
if value > a3:
    value = a3
print(value)
d = []
A = []
for i in range(K):
    _d = int(input())
    d.append(_d)
    _a = [int(x) for x in input().split()]
    A.append(_a)

res = []
for i in range(1, N+1):
    res.append(i)

for a in A:
    for _a in a:
        if _a in res:
            res.remove(_a)
print(len(res))


### FIXED CODE ###

N, K = [int(x) for x in input().split()]

d = []
A = []
for i in range(K):
    _d = int(input())
    d.append(_d)
    _a = [int(x) for x in input().split()]
    A.append(_a)

res = []
for i in range(1, N+1):
    res.append(i)

for a in A:
    for _a in a:
        if _a in res:
            res.remove(_a)
print(len(res))
#!/usr/bin/python3
# -*- coding:utf-8 -*-

import numpy

MAX = 10 ** 9 + 7

def prod_mod(la, mod):
  x = 1
  for a in la:
    x *= a
    x %= mod
  return x

def main():
  n, k = map(int, input().strip().split())
  la = numpy.array(list(map(int, input().strip().split())))
  la = la[numpy.argsort(numpy.abs(la))][::-1]
  if n == k:
    print(prod_mod(la, MAX))
  else:
    if k % 2 == 1 and (la >= 0).sum() == 0:
      print(prod_mod(la[-k:], MAX))
    else:
      lal, lar = la[:k], la[k:]
      lal.sort()
      nlm = (lal < 0).sum()
      if nlm % 2 == 0:
        print(prod_mod(lal, MAX))
      else:
        mpr = numpy.max(lar)
        mmr = numpy.min(lar)
        if mpr >= 0 and mmr < 0:
          if nlm != len(lal) and abs(mpr * lal[nlm]) > abs(mmr * lal[nlm-1]):
            lal[nlm-1] = mpr
          else:
            lal[nlm] = mmr
        elif mpr >= 0:
          lal[nlm-1] = mpr
        elif nlm != len(lal) and mmr < 0:
          lal[nlm] = mmr
        print(prod_mod(lal, MAX))

if __name__=='__main__':
  main()



### FIXED CODE ###

#!/usr/bin/python3
# -*- coding:utf-8 -*-

import numpy

MAX = 10 ** 9 + 7

def prod_mod(la, mod):
  x = 1
  for a in la:
    x *= a
    x %= mod
  return x

def main():
  n, k = map(int, input().strip().split())
  la = numpy.array(list(map(int, input().strip().split())))
  la.sort()
  if n == k:
    print(prod_mod(la, MAX))
  else:
    if k % 2 == 1 and (la >= 0).sum() == 0:
      print(prod_mod(la[-k:], MAX))
    else:
      il, ir = 0, n-1
      cnt = 0
      l = []
      if k % 2 == 1:
        l.append(la[ir])
        ir -= 1
        cnt += 1
      while k - (cnt + 2) >= 0:
        if la[il] * la[il+1] > la[ir-1] * la[ir]:
          l.extend([la[il], la[il+1]])
          il += 2
        else:
          l.extend([la[ir-1], la[ir]])
          ir -= 2
        cnt += 2
      print(prod_mod(l, MAX))
      

if __name__=='__main__':
  main()
import sys
input = sys.stdin.readline
N, K = map(int, input().split())


AB = []
for _ in range(1, N):
    a, b = map(int, input().split())
    AB.append((a, b))
    
# 無効グラフなので双方向にする
graph = {}
for a,b in AB:
    if not a in graph:
        graph[a] = {}
    if not b in graph:
        graph[b] = {}
    graph[a][b] = 1
    graph[b][a] = 1


from heapq import heappush, heappop

def dijkstra(graph, start, N):
    # path_lenが色数
    A = [None] * (N+1)
    queue = [(K, start)]
    while queue:
        path_len, v = heappop(queue)
        if A[v] is None: # v is unvisited
            A[v] = path_len
            if path_len == K:
                path_len = K
            else:
                path_len = K-1
            for w, edge_len in graph[v].items():
                if A[w] is None:
                    path_len -= 1
                    heappush(queue, (path_len, w))

    # to give same result as original, assign zero distance to unreachable vertices             
    return [0 if x is None else x for x in A]

shortest = dijkstra(graph, 1, N)

ans = 1
for i in shortest[1:]:
    ans *= i
print(ans % 1000000007)
    

### FIXED CODE ###

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

AB = []
for _ in range(1, N):
    a, b = map(int, input().split())
    AB.append((a, b))
    
if N == 1:
    print(K)
else:
    # 無効グラフなので双方向にする
    graph = {}
    for a,b in AB:
        if not a in graph:
            graph[a] = {}
        if not b in graph:
            graph[b] = {}
        graph[a][b] = 1
        graph[b][a] = 1


    #print(graph)

    collors = [None] * (N+1)
    from collections import deque
    q = deque([(K, 1)]) 
    while q:
        col_num, v = q.popleft()
        if collors[v] == None:
            collors[v] = col_num

            if col_num == K:
                rest_col = K-1
            else:
                rest_col = K-2

            for v in graph[v]:
                if collors[v] == None:
                    q.appendleft((rest_col, v))
                    rest_col -= 1
    #print(collors)  

    MOD = 10**9+7

    ans = 1
    for i in collors[1:]:
        ans = ans * i % MOD
    print(ans)
a = int(input())
s = input()
if (a=>3200):print(s)
else:print("red")

### FIXED CODE ###

a = int(input())
s = input()
if a>=3200:print(s)
else:print("red")
N, A, B = map(int, input().split())

if B == 0:
    print(N)
else:
    result = 0
    while N > 0:
        if N - A > 0:
            result += A
        else:
            result += N
        N -= A
        N -= B
print(result)

### FIXED CODE ###

N, A, B = map(int, input().split())
if A == 0:
    print('0')
elif B == 0:
    print(N)
else:
    tmp = N // (A + B)
    result = tmp * A
    N -= tmp * (A + B)
    if N > A:
        result += A
    else:
        result += N
    print(result)
n = int(input())
k = int(input())
if n>=10:
    print(k)
else:
    print(k+(100*(10-n)))

### FIXED CODE ###

n,k = map(int,input().split())
if n >= 10:
    print(k)
else:
    print(k+(100*(10-n)))
a,b=map(int,input().split())
if a==b:
    print(a+b)
else:
    c=max(a,b)
print(c+(c-1))


### FIXED CODE ###

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

if a==b:
    print(a+b)
else:
    c=max(a,b)
    print(c+(c-1))
n=input().split(" ")
a=int(n[0])
b=int(n[1])
c=int(n[2])
count=0
for i in range(a+b+1):
     if c/i==0:
       count=i+1
print(count)


### FIXED CODE ###

x=input().split(" ")
a=int(x[0])
b=int(x[1])
c=int(x[2])
count=0
for i in range(a,b+1):
  if c%i==0:
   count+=1
print(count)
n,m = map(int,input().split())
tr = [[] for _ in range(n)]
for i in range(m):
    a,b=map(int,input().split())
    tr[a-1].append(b)
    tr[b-1].append(a)
if not tr[0]:
    print('No')
else:
    mark = [10**7]*n
    mark[0] = -1
    cnt = 0
    i=0
    from collections import deque
    que = deque()
    def mk(mark,que,cnt):
        i = que.popleft()-1
        for j in range(len(tr[i])):
            if tr[i][j]!=1:
                mark[tr[i][j]-1] = min(i+1,mark[tr[i][j]-1])
                cnt+=1
                que.append(tr[i][j])
                if cnt == n:
                    return mark
            else:
                continue
        else:
            mark = mk(mark,que,cnt)
            return mark
    que.append(1)
    mark=mk(mark,que,cnt)
    if 10**7 in mark:
        print('No')
    else:
        print('Yes')
        for i in range(1,n):
            print(mark[i])

### FIXED CODE ###

from collections import deque
 
n,m = list(map(int, input().split()))
put = [1]*(n+1)
 
ab = [[] for i in range(n+1)]
for i in range(m):
	a,b = map(int, input().split())
	ab[a].append(b)
	ab[b].append(a)

q = deque([1])
flg = [-1]*n
flg[0] = 0

while q:
	item = q.popleft()
	for i in ab[item]:
		if put[i]:
			flg[i-1]=item
			q.append(i)
			put[i]=0
 
if -1 in flg:
	print("No")
	exit()
 
print("Yes")
for i in range(1,len(flg)):
	print(flg[i])
O = input()
E = input()

for i in range(E.length()):
  print(O[i], end='')
  print(E[i], end='')
  
if not(E.length() == O.length()):
  print(O[O.length() - 1])

### FIXED CODE ###

O = input()
E = input()

for i in range(len(E)):
  print(O[i], end='')
  print(E[i], end='')
  
if not(len(E) == len(O)):
  print(O[len(O) - 1])
a=list(input()).sort
print(a[0] if a[0]!=a[1] else a[2])

### FIXED CODE ###

a=input().split()
a.sort()
print(a[2] if a[0]==a[1] else a[0])
#list(map(int,input().split()))
n,m=map(int,input().split())
it=[[0 for i in range(n)] for j in range(n)]
for i in range(n):
    j=input()
    for k in range(m):
        if j[k]=="#":
            it[i][k]=0
        else:
            it[i][k]=1
dp=[[0 for i in range(n)] for j in range(n)]
for i in range(n):
    for j in range(m):
        if it[i][j]==0:
            dp[i][j]=1
        if(i>0 or j>0):
            if(i==0):
                dp[i][j]+=dp[i][j-1]
            elif j==0:
                dp[i][j]+=dp[i-1][j]
            else:
                dp[i][j]+=min(dp[i-1][j],dp[i][j-1])
print(dp[n-1][m-1])


### FIXED CODE ###

#list(map(int,input().split()))
n,m=map(int,input().split())
it=[[0 for i in range(m)] for j in range(n)]
for i in range(n):
    j=input()
    for k in range(m):
        if j[k]=="#":
            it[i][k]=0
        else:
            it[i][k]=1
dp=[[0 for i in range(m)] for j in range(n)]
for i in range(n):
    for j in range(m):
        
        if(i>0 or j>0):
            if(i==0):
                dp[i][j]=dp[i][j-1]
                if(it[i][j-1]==1 and it[i][j]==0):
                    dp[i][j]+=1
            elif j==0:
                dp[i][j]=dp[i-1][j]
                if(it[i][j]==0 and it[i-1][j]==1):
                    dp[i][j]+=1
            else:
                a=0
                b=0
                if(it[i][j]==0):
                    if(it[i-1][j]==1):
                        a=1
                    if(it[i][j-1]==1):
                        b=1
                dp[i][j]=min(dp[i-1][j]+a,dp[i][j-1]+b)
        else:
            if it[i][j]==0:
                dp[i][j]=1

print(dp[n-1][m-1])
# ABC150 D
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
from fractions import gcd
from math import ceil
def lcm(x, y):
    return (x * y) // gcd(x, y)
n,m=nm()
a=nl()
ans=0
a=[x//2 for x in a] 

lcm_v=a[0]
for i in range(n):
    lcm_v=lcm(lcm_v,a[i])
ok_flg=[(lcm_v//i)%2==1 for i in a]
if all(ok_flg):
    ans=((m//lcm)+1)//2
print(ans)



### FIXED CODE ###

# ABC150 D
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
from fractions import gcd
from math import ceil
def lcm(x, y):
    return (x * y) // gcd(x, y)
n,m=nm()
a=nl()
ans=0
a=[x//2 for x in a] 

lcm_v=a[0]
for i in range(n):
    lcm_v=lcm(lcm_v,a[i])
ok_flg=[(lcm_v//i)%2==1 for i in a]
if all(ok_flg):
    ans=((m//lcm_v)+1)//2
print(ans)