Harryxun/stf_run huggingface dataset:
N,T = list(map(int,input().split()))
c = [None for _ in range(N)]
t = [None for _ in range(N)]
A = [None for _ in range(N)]
for i in range(N):
  c[i], t[i] = input().split()
  c[i] = int(c[i])
  t[i] = int(t[i])
for i in range(N):
  if t[i] <= T:
    A[i] = c[i]
A = [a for a in A if type(a) != 'Nonetype']
A = sorted(A)
ans = A[0]
print(ans)

### FIXED CODE ###

N, T = list(map(int,input().split()))
c = [0 for i in range(N)]
t = [0 for i in range(N)]
for i in range(N):
  c[i], t[i] = input().split()
  c[i] = int(c[i])
  t[i] = int(t[i])

ans = float('inf')
for i in range(N):
  if t[i] <= T and c[i] < ans:
    ans = c[i]
if ans == float('inf'):
  print('TLE')
else:
  print(ans)
import sys
sys.setrecursionlimit(10000)
N,m,k = [int(x) for x in input().split()]
p = []
q = []
roots = [0]*(N+1)
rootmatome = [0]*(N+1)
tonari = [0]*(N+1)
dame = [0]*(N+1)
for i in range(m):
    p.append(list(map(int, input().split())))
for i in range(k):
    q.append(list(map(int, input().split())))
par = []
for i in range(N+1):
    par.append(i)
def root(x):
    if par[x] == x:
        return x
    par[x] = root(par[x])
    return root(par[x])
def unite(x,y):
    rx = root(x)
    ry = root(y)
    if rx == ry:
        return
    par[rx] = ry
def same(x,y):
    rx = root(x)
    ry = root(y)
    return rx == ry
for i in range(m):
    unite(p[i][0],p[i][1])
for i in range(1,N+1):
  roots[i] = root(i)
for i in range(1,N+1):
    rootmatome[roots[i]] += 1
for i in range(m):
    tonari[p[i][0]] += 1
    tonari[p[i][1]] += 1
for i in range(k):
    if roots[q[i][0]] == roots[q[i][1]]:
        dame[q[i][0]] += 1
        dame[q[i][1]] += 1
for i in range(1,N+1):
    print(rootmatome[roots[i]] - tonari[i] - dame[i] - 1,end=" ")          



### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)
N,m,k = [int(x) for x in input().split()]
p = []
q = []
roots = [0]*(N+1)
rootmatome = [0]*(N+1)
tonari = [0]*(N+1)
dame = [0]*(N+1)
for i in range(m):
    p.append(list(map(int, input().split())))
for i in range(k):
    q.append(list(map(int, input().split())))
par = []
for i in range(N+1):
    par.append(i)
def root(x):
    if par[x] == x:
        return x
    par[x] = root(par[x])#この一文で早くなる
    return root(par[x])
def unite(x,y):
    rx = root(x)
    ry = root(y)
    if rx == ry:
        return
    par[rx] = ry
for i in range(m):
    unite(p[i][0],p[i][1])
for i in range(1,N+1):
  roots[i] = root(i)
for i in range(1,N+1):
    rootmatome[roots[i]] += 1
for i in range(m):
    tonari[p[i][0]] += 1
    tonari[p[i][1]] += 1
for i in range(k):
    if roots[q[i][0]] == roots[q[i][1]]:
        dame[q[i][0]] += 1
        dame[q[i][1]] += 1
for i in range(1,N+1):
    print(rootmatome[roots[i]] - tonari[i] - dame[i] - 1,end=" ")
# import itertools
# import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np

# N = int(input())
S = input()
# n, *a = map(int, open(0))
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]
# S = input()

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

Q = int(input())
direction = 1
for i in range(Q):
    l = input().split()
    if l[0] == "1":
        direction *= -1
    else:
        if (l[1] == "1" and direction == 1) or (l[1] == "2" and direction == -1):
            S = l[2] + S
        else:
            S += l[2]

if direction == 1:
    print(S)
else:
    print(S[::-1])

### FIXED CODE ###

# import itertools
# import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np

# N = int(input())
S = input()
# n, *a = map(int, open(0))
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

# def factorization(n):
#     arr = []
#     temp = n
#     for i in range(2, int(-(-n**0.5//1))+1):
#         if temp%i==0:
#             cnt=0
#             while temp%i==0:
#                 cnt+=1
#                 temp //= i
#             arr.append([i, cnt])
#     if temp!=1:
#         arr.append([temp, 1])
#     if arr==[]:
#         arr.append([n, 1])
#     return arr

A = S.count("A")
B = S.count("B")

if 0 < A < 3:
    print("Yes")
else:
    print("No")
def main():
    n, k, *a = map(int, open(0).read().split())
    a = [0] + a
    root = [1]
    now = 1
    count = 0
    roop_start = 0
    while count <= k:
        count += 1
        next = a[now]
        if next in root:
            roop_start = next
            break
        else:
            root.append(next)
            now = next
    else:
        print(now)

    root_end = now
    roop_end_index = count - 1
    roop_start_index = root.index(roop_start)

    left_count = k - count
    items = roop_end_index - roop_start_index + 1

    p, q = divmod(left_count, items)
    index = roop_start_index + q


    print(root[index])



if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    n, k, *a = map(int, open(0).read().split())
    a = [0] + a
    root = [1]
    visited = [False for _ in range(n+1)]
    nx = 1
    visited[1] = True

    step = 0
    while True:
        step += 1
        now = nx
        nx = a[now]
        if step == k:
            print(nx)
            break
        if visited[nx]:
            end = step
            start = root.index(nx)
            d = end - start
            r = k - step
            index = start + r % d
            print(root[index])
            break

        visited[nx] = True
        root.append(nx)

if __name__ == '__main__':
    main()
A = input()
#高さ、面積,位置
st = [(0, 0, -1)]
#高さ、高さの最高値？
cur = 0; ma = 0
for i, a in enumerate(A):
    if a == '/':
        cur += 1
        s = 0
        while st and st[-1][0] == cur-1 and cur <= ma:
            lev, su, j = st.pop()
            s += su
        if st and st[-1][0] == cur:
            s += i - st[-1][2] - 1
        ma = max(ma, cur)
        st.append(cur, s, i)
    elif a == '\\':
        cur -= 1
        st.append((cur, 0, i))
    elif a == '_':
        st.append((cur, 0, i))
ans = []
for lev, su, j in st:
    if su > 0:
        and.append(su)
print(sum(ans))
print(len(ans), *ans)


### FIXED CODE ###

A = input()
st = [(0, 0, -1)]
cur = 0; ma = 0
for i, a in enumerate(A):
    if a == '/':
        cur += 1
        s = 0
        while st and st[-1][0] == cur-1 and cur <= ma:
            lev, su, j = st.pop()
            s += su
        if st and st[-1][0] == cur:
            s += i - st[-1][2] - 1
        ma = max(ma, cur)
        st.append((cur, s, i))
    elif a == '\\':
        cur -= 1
        st.append((cur, 0, i))
    elif a == '_':
        st.append((cur, 0, i))
ans = []
for lev, su, j in st:
    if su > 0:
        ans.append(su)
print(sum(ans))
print(len(ans), *ans)
x = map(int, input().split())
max1 = 1
for s in range(100):
  for t in range(100):
    if pow(s,t) > max1 and pow(s,t) <= x:
      max1 = pow(s,t)
    


print(max1)

### FIXED CODE ###

x = int(input())
max1 = 1
for s in range(x):
  for t in range(2,10):
    if pow(s,t) > max1 and pow(s,t) <= x:
      max1 = pow(s,t)
print(max1)
import sys
input = sys.stdin.readline
 
K,S=map(int,input().split())
 
z = list(range(K+1))
ans = [None]*(K+1)
 
for i in z:
  s_z = S - i
  if s_z < 0:
    ans[i] = 0
  elif K < s_z:
    if (K + 1) > (s_z - K):
      ans[i] = 2*K - s_z + 1
  else:
    ans[i] = s_z + 1
 
print(sum(ans))

### FIXED CODE ###

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

z = list(range(0,K+1))
answer = []

for i in z:
  s_z = S - i
  if s_z < 0:
    pass
  elif K < s_z:
    if (K + 1) > (s_z - K):
      answer.append(K + 1 - (s_z - K))
  else:
    answer.append(s_z + 1)

print(sum(answer))
N,M = map(int,(input().split()))

ans = "IMPOSSIBLE"

ls = [[] for m in range(M)]
for m in range(M):
    a,b = map(int,(input().split()))
    ls[m].append(a-1)
    ls[m].append(b-1)
    
    if a-1 == 0 and b == N-1:
        ans = "POSSIBLE"
    if a-1 == 0:
        ls[m].append("P")
    else:
        ls[m].append("I")

for m in range(M):
    if ls[m][2] == "P" and ls[ls[m][1]][1] == N-1:
        ans = "POSSIBLE"

print(ans)

### FIXED CODE ###

from sys import stdin
input = stdin.readline

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

ans = "IMPOSSIBLE"

seta,setb = set(),set()
af,bf = [False]*M,[False]*M

for m in range(M):
    a,b = map(int,(input().split()))
    if a-1 == 0:
        af[m] = True
        seta.add(b-1)
    if b-1 == N-1:
        bf[m] = True
        setb.add(a-1)
    if af[m] and bf[m]:
        ans = "POSSIBLE"
        break
    
for a in seta:
    if ans == "POSSIBLE":
        break
    if a in setb:
        ans = "POSSIBLE"
        break

print(ans)
from math import factorial

N = int(input())
K = int(input())


def ncr(n, r):
    if n <= 0:
        return 0
    return factorial(n) // factorial(r) // factorial(n - r)


def k1(n):
    s = str(n)
    return (len(s) - 1) * 9 + int(s[0])


def k2(n):
    if n < 10:
        return 0
    s = str(n)
    res = ncr(len(s)-1, 2) * 9 * 9
    res += (int(s[0]) - 1) * k1(10 ** (len(s) - 1) - 1) + k1(int(s[1:]))
    return res


def k3(n):
    s = str(n)
    res = ncr(len(s)-1, 3)*9*9*9
    res += (int(s[0]) - 1) * k2(10 ** (len(s) - 1) - 1) + k2(int(s[1:]))
    return res


kf = [k1, k2, k3]
print(kf[K-1](N))


### FIXED CODE ###

# 0でない数字がちょうどK個
S = input().strip()
K = int(input())
N = len(S)

'''
桁DP
dp[i][j][k] := 
i桁目まで使って
j個の0ではない数値を使って
k=0:i桁目までSと一致
  1:S未満(以下？)
'''
dp = [[[0]*2 for _ in range(K+1)] for _ in range(101)]
dp[0][0][0] = 1

for i in range(N):
    for j in range(K+1):
        for k in range(2):
            nd = int(S[i])
            # 0-9まで調べていく
            for d in range(10):
                ni, nj, nk = i+1, j, k
                if d > 0:
                    nj += 1
                if nj > K:
                    continue
                if k == 0:
                    if d > nd:
                        continue
                    elif d != nd:
                        nk = 1
                dp[ni][nj][nk] += dp[i][j][k]

print(sum(dp[N][K]))
# AOJ 0220 Binary Digit A Doctor Loved
# Python3 2018.6.23 bal4u

while 1:
	a, b = map(int, input().split('.'))
	if a < 0: break
	if a > 255:
		print("NA")
		continue
	sa = format(a, '08b')
	sb, s = '', str(b)
	k = 10**len(s)
	for i in range(4):
		b *= 2
		if b >= k: sb += '1'
		else: sb += '0'
		b %= k
	if b == 0: print(sa, '.', sb, sep='')
	else: print("NA")



### FIXED CODE ###

# AOJ 0220 Binary Digit A Doctor Loved
# Python3 2018.6.23 bal4u

while 1:
	s = input()
	if s[0] == '-': break
	if s.find('.') < 0: a, b = s, '0'
	else:
		a, b = s.split('.')
		if a == '': a = '0'
		if b == '': b = '0'
	k = 10**len(b)
	a, b = int(a), int(b)
	if a > 255:
		print("NA")
		continue
	sa = format(a, '08b')
	sb = ''
	for i in range(4):
		b *= 2
		if b >= k: sb += '1'
		else: sb += '0'
		b %= k
	if b == 0: print(sa, '.', sb, sep='')
	else: print("NA")
n = int(input())
p = list(map(int, input().split(' ')))
#p = [list(map(int, input().split())) for _ in range(n)]
p = sorted(p, reverse=True)
if len(p) != n:
  raise ValueError

#print(p[0], p[1:])
if p[0] < sum(p[1:]):
	print('Yes')
else:
	print('No')

### FIXED CODE ###


t, x = map(int, input().split(' '))
print(t/x)
input_num = map(int, input().split())

print(input_num[0]*input_num[1])

### FIXED CODE ###

input_nums = input().split()

output = 1

x = map((lambda x: int(x)), input_nums)

for num in x:
    output *= num
    
print(output)
N , K =  list(map(int,input().split()))
keta = 0
for i in range(1000):
    if 2**i > K:
       keta=i
       break

K_2 = bin(K)[2:]

max_kouho = [K_2,"1"* (len(K_2) -1) ]

for i in range(1,len(K_2)-1):
    if K_2[i] == "1" :
        #print(K_2[:i-1]+"00"+ ("1" * 100)[- (len(K_2)-i-1 if len(K_2)-i-1 > 0 else 100 ):] )
        max_kouho.append(
            (K_2[:i]+"0"+ ("1" * 100) )[:len(K_2)] )
#print(max_kouho)


AB  = [ list(map(int,input().split())) for _ in range(N)]
#ans =0

dp = {key:0 for key in max_kouho}
ans_use_top = 0     # 100111
ans_not_use_top = 0 # 011111
for a,b in AB:
    #use
    for key in max_kouho:
        if int(key,2) |a ==int(key,2):
            dp[key]+=b
    #print(bin(a),b,dp)

print(max(dp[key] for key in max_kouho ))

### FIXED CODE ###

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


K_2 = bin(K)[2:]
max_kouho = [K_2,("1"* (len(K_2) -1) if len(K_2)>1 else "0") ]



for i in range(1,len(K_2)-1):
    if K_2[i] == "1"  and K_2.find("0") >-1:
        max_kouho.append(
            (K_2[:i]+"0"+ ("1" * 100) )[:len(K_2)] )
#print(max_kouho)

AB  = [ list(map(int,input().split())) for _ in range(N)]

if K==0:
    ans =0
    for a,b in (AB):
        if a==0:
            ans +=b
    print(ans)
    exit()
dp = {key:0 for key in max_kouho}
for a,b in AB:
    #use
    for key in max_kouho:
        if int(key,2) |a ==int(key,2):
            dp[key]+=b
    #print(bin(a),b,dp)

print(max(dp[key] for key in max_kouho ))
import numpy as np
X, Y, Z, K = [int(i) for i in input().split()]

A = sorted([int(i) for i in input().split()], reverse=True)
B = sorted([int(i) for i in input().split()], reverse=True)
C = sorted([int(i) for i in input().split()], reverse=True)

Anum = 0
Bnum = 0
Cnum = 0

AB=np.zeros(X*Y)
for i in range(X):
    for j in range(Y):
        AB[Y*i+j] = A[i]+B[j]

AB = sorted(AB, reverse=True)
AB = AB[:min(X*Y,K)]

ABC=np.zeros(len(AB)*Z)
for i in range(len(AB)):
    for j in range(Z):
        ABC[Z*i+j]=AB[i]+C[j]

ABC = sorted(ABC, reverse=True)

for i in range(K):
    print(ABC[i])


### FIXED CODE ###

X, Y, Z, K = [int(i) for i in input().split()]

A = sorted([int(i) for i in input().split()], reverse=True)
B = sorted([int(i) for i in input().split()], reverse=True)
C = sorted([int(i) for i in input().split()], reverse=True)

Anum = 0
Bnum = 0
Cnum = 0

AB = []
for i in range(X):
    for j in range(Y):
        AB.append(A[i]+B[j])

AB = sorted(AB, reverse=True)
AB = AB[:min(X*Y,K)]

ABC = []
for i in range(len(AB)):
    for j in range(Z):
        ABC.append(AB[i]+C[j])

ABC = sorted(ABC, reverse=True) 

for i in range(K):
    print(int(ABC[i]))
import math
x = int(input())

L = []
for i in range(2,int(math.floor(math.sqrt(x)))+1):
  for j in range(x//i + 1):
    if i ** j <= x:
      L.append(i ** j)
      
print(max(L))

### FIXED CODE ###

import math
x = int(input())

L = []
for i in range(2,int(math.floor(math.sqrt(x)))+1):
  for j in range(x//i + 1):
    if i ** j <= x:
      L.append(i ** j)
      
if L == []:
  print("1")
else:
  print(max(L))
N, K = map(int, input().split())
p = list(map(int, input().split()))

sum_k = [0] * N
tmp = 0
for i in range(K):
    tmp += p[i]
sum_k[0] = tmp
max_sum = tmp
candidate = 0
for i in range(len(p)-K):
    sum_k[i+1] = sum_k[i] - p[i] + p[i+K]
    if max_sum < sum_k[i+1]:
        max_sum = sum_k[i+1]
        candidate = i+1


dice = [-1] * 1001

ans = 0
for i in range(candidate, candidate + K):
    tmp = 0
    if dice[p[i]+1] != -1:
        ans += dice[p[i]+1]
        continue
    for j in range(1, p[i]+1):
        tmp += j * (1 / p[i])
    dice[p[i]+1] = tmp
    ans += tmp
print(ans)

### FIXED CODE ###

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

sum_k = [0] * N
tmp = 0
for i in range(K):
    tmp += p[i]
sum_k[0] = tmp
max_sum = tmp
candidate = 0
for i in range(len(p)-K):
    sum_k[i+1] = sum_k[i] - p[i] + p[i+K]
    if max_sum < sum_k[i+1]:
        max_sum = sum_k[i+1]
        candidate = i+1


dice = [-1] * 10000

ans = 0
for i in range(candidate, candidate + K):
    tmp = 0
    if dice[p[i]+1] != -1:
        ans += dice[p[i]+1]
        continue
    for j in range(1, p[i]+1):
        tmp += j * (1 / p[i])
    dice[p[i]+1] = tmp
    ans += tmp
print(ans)
A,B,C=map(int,input(),split())
print(C-A+B)

### FIXED CODE ###

A,B,C = map(int,input().split())
X = C - A + B
if X < 0:
    X = 0
print(X)
import math
from functools import reduce
def gcd_list(numbers):
    return reduce(math.gcd, numbers)


N, X= map(int, input().split())
toshi = list(map(int, input().split()))

if N == 1:
    print(toshi[0] - X)
    exit()

diff = []

for i in range(N - 1):
    diff.append(abs(toshi[i+1] - toshi[i]))

print(gcd_list(diff))


### FIXED CODE ###

import fractions
from functools import reduce

n, x = map(int, input().split())
xl = list(map(int, input().split()))
xl.append(x)
xl.sort()
xldiv = []
for i in range(n):
    xldiv.append(xl[i + 1] - xl[i])

print(reduce(fractions.gcd, xldiv))
A, B, C, D = map(int, input().split())

if A*B >= C*D:
  print(A*B)
if C*D>= A*B:

### FIXED CODE ###

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

Rectangle1 = A*B
Rectangle2 = C*D

if Rectangle1 > Rectangle2:
    print(Rectangle1)
elif Rectangle1 < Rectangle2:
    print(Rectangle2)
else:
    print(Rectangle1)
A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print({}.ans)
else :
    print(str(-1))A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print(ans)
else :
    print(str(-1))

### FIXED CODE ###

A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print(ans)
else :
    ans = -1
    print(ans)
def resolve():
    import sys
    import math
    H, W, N = map(int, sys.stdin.read().split('\n'))
    m = max(H, W)
    print(math.ceil(N / m))
resolve()

### FIXED CODE ###

def resolve():
    H = int(input())
    W = int(input())
    N = int(input())
    m = max(H, W)
    print(N // m if N / m == N//m else N // m + 1)
resolve()
N, M = map(int, input().split())
def make_graph(x, y, dic):
    if x in dic.keys():
        dic[x].append(y)
    else:
        dic[x] = [y]
def dfs(p):
    if memo[p] != -1:
        return memo[p]
    if p not in dic.keys():
        return 0
    m = 0
    for d in dic[p]:
        m = max(m, dfs(d)+1)
    return m

dic = {}
for m in range(M):
    x, y = map(int, input().split())
    make_graph(x-1, y-1, dic)

inf = -1
memo = [inf]*N
ans = 0
for i in range(N):
    k= dfs(i-1)
    memo[i-1] = k
    ans = max(ans,k)
print(ans)

### FIXED CODE ###

import sys
 
sys.setrecursionlimit(100000)
 
N, M = map(int, input().split(" "))
G = [[] for _ in range(N)]
 
for _ in range(M):
    x, y = map(int, input().split(" "))
    G[x-1].append(y-1)
dp = [-1] * N
def pathlen(G, dp, v):
    if dp[v] != -1:
        return dp[v]
 
    plen = 0
    for i in G[v]:
        plen = max(plen, pathlen(G, dp, i)+1)
    dp[v] = plen
    return plen
ans = 0
for i in range(N):
    ans = max(ans, pathlen(G, dp, i))
print(ans)
n=int(input())
m = int(pow(n,1/2)) + 1
k = 0
for i in range(m):
  fi n > pow(i,2):
    break
  else:
    k = pow(i,2)
print(k)

### FIXED CODE ###

n=int(input())
m = int(pow(n,1/2)) + 1
k = 0
for i in range(n+1):
  if n < pow(i,2):
    break
  if k <= pow(i,2):
    k = pow(i,2)  
  for z in range(3,n):
    if n < pow(i,z):
      break
    elif k <= pow(i,z):
      k = pow(i,z)
 
print(k)
w,h,x,y=map(int,input().split())
if x==w/2 and x==h/2:
  a==1
else:
  a==0
print(w*h/2,a)

### FIXED CODE ###

w,h,x,y=map(int,input().split())
if x==w/2 and y==h/2:
  a=1
else:
  a=0
print(w*h/2,a)
N = int(input())
S = input()
cut = 0
for n in range(N):
    if S[n] == 'A' and S[n + 1] == 'B' and S[n + 2] == 'C':
        cut += 1

print(cut)


### FIXED CODE ###

N = int(input())
S = input()
cut = S.count('ABC')
print(cut)
l = list(map(int,input().split().split()))
l.sort()
print(l[0]*10 +l[1]+l[2])

### FIXED CODE ###

a,b = map(int,input().split())
if a*b %2 != 0:
  print('Yes')
else :
  print('No')
X, N = map(int, input().split())
if N!=0:
    p=list(map(int,input().split()))
    checkNum=[0 for j in range(101)]
    for i in range(len(p)):
        checkNum[p[i]]=1
    i=0
    while(X-i>=0 or X+1<101):
        if checkNum[X-i]==0:
            print(X-i)
            break
        if checkNum[X+i]==0:
            print(X+i)
            break
        i+=1
else:
    print(X)

### FIXED CODE ###

X, N = map(int, input().split())
if N!=0:
    p=list(map(int,input().split()))
    checkNum=[0 for j in range(102)]
    for i in range(len(p)):
        checkNum[p[i]]=1
    i=0
    while(X-i>=0 or X+i<=101):
        if X-i>=0:
            if checkNum[X-i]==0:
                print(X-i)
                break
        if X+i<=101:
            if checkNum[X+i]==0:
                print(X+i)
                break
        i+=1
else:
    print(X)
n, m = map(int, input().split())
a = [-1]
for i in range(m):
    a.append(int(input()))
a.append(n+1)

stairs = [0, 1]
for i in range(2, n+1):
    stairs.append(stairs[i-1] + stairs[i-2])

mod = 10 ** 9 + 7
count = 1
for i in range(m+1):
    diff = a[i+1] - a[i] - 1
    count *= stairs[diff]
print(count % mod)


### FIXED CODE ###

n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]

ways = [1, 1]
for i in range(2, n + 1):
    ways.append(ways[i-2] + ways[i-1])

stairs = []
now = 0
for i in range(m):
    stairs.append(a[i] - 1 - now)
    now = a[i] + 1

stairs.append(n - now)

ans = 1
for ele in stairs:
    if ele == -1:
        ans *= 0
    else:
        ans *= ways[ele]

mod = 10 ** 9 + 7
print(ans % mod)