Harryxun/stf_run huggingface dataset:
import math
X = int(input())

def is_prime(x):
    a = int(math.sqrt(X)) + 1#ある数が素数かどうかはO(√A)で判定できる
    for i in range(2,a):
        if x % i == 0:
            return False
    return True#xは素数

for j in range(X,10**5):
    if is_prime(j):
        ans = j    
        break
print(ans)

### FIXED CODE ###

import math
X = int(input())

def is_prime(x):
    a = int(math.sqrt(X)) + 1
    for i in range(2,a):
        if x % i == 0:
            return False
    return True

for j in range(X,X+100):
    if is_prime(j):
        ans = j    
        break
print(ans)
n, m = map(int, input().split())
h = list(map(int, input().split()))

tmp = [1] * n

ab = [map(int, input().split()) for _ in range(M)]
a, b = [list(i) for i in zip(*ab)]

for i in range(m):
    if h[a[i] - 1] > h[b[i] - 1]:
        tmp[b[i] - 1] = 0
    elif h[a[i] - 1] < h[b[i] - 1]:
        tmp[a[i] - 1] = 0
    else:
        tmp[a[i] - 1] = 0
        tmp[b[i] - 1] = 0

print(sum(tmp))

### FIXED CODE ###

n, m = map(int, input().split())
h = [int(i) for i in input().split()]
obs = [True]*n
ab = []

for i in range(m):
    ab.append(input().split())

for j in range(len(ab)):
    if h[int(ab[j][0]) - 1] > h[int(ab[j][1]) - 1]:
        obs[int(ab[j][1]) - 1] = False

    elif h[int(ab[j][1]) - 1] > h[int(ab[j][0]) - 1]:
        obs[int(ab[j][0]) - 1] = False

    elif h[int(ab[j][0]) - 1] == h[int(ab[j][1]) - 1]:
        obs[int(ab[j][0]) - 1] = False
        obs[int(ab[j][1]) - 1] = False

print(obs.count(True))
import sys 
L,R = map(int, input().split())

if R-L >= 2019:
    print(0)
    sys.exit()
elif R-L == 1:
    print((i*j)%2019)
    sys.exit()

ans = 4000

for i in range(L,R):
    for j in range(i+1,R):
        number = (i*j)%2019
        ans = min(ans,number)

print(ans)  

### FIXED CODE ###

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

#電車の時
TRAIN = N*A

TAXI = B

if TRAIN > TAXI:
    print(TAXI)
else:
    print(TRAIN)
import sys

x = sys.argv[1] ** 3

print(x)

### FIXED CODE ###

print(int(input())**3)
N = int(input())
A = [int(a) for a in input().split()]

dpmax = [[0]*N for _ in range(N)]
dpmin = [[0]*N for _ in range(N)]
        
def f(i, j, t):
    if i > j or i < 0 or i >= N or j < 0 or j >= N:
        return 0
    
    if i == j:
        if t == 0:
            dpmin[i][j] = -A[i]
            return -A[i]
        if t == 1:
            dpmax[i][j] = A[i]
            return A[i]
        
    if t == 0 and dpmin[i][j] > 0:
        return dpmin[i][j]
    elif t == 1 and dpmax[i][j] > 0:
        return dpmax[i][j]
    
    if t == 0:
        dpmin[i][j] = min(-A[i]+f(i+1, j, 1), -A[j]+f(i, j-1, 1))
        return dpmin[i][j]
    else:
        dpmax[i][j] = max(A[i]+f(i+1, j, 0), A[j]+f(i, j-1, 0))
        return dpmax[i][j]

ans = f(0, N-1, 1)
print(ans)

### FIXED CODE ###

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

dp = [[0]*N for _ in range(N)]
        
for k in range(N):
    for i in range(N-k):
        if k == 0:
            dp[i][i] = A[i]
            continue
    
        dp[i][i+k] = max(A[i]-dp[i+1][i+k], A[i+k]-dp[i][i+k-1])

print(dp[0][N-1])
n=int(input())
dat = list(map(int, input().split()))

flag=True
count = 0

for e in dat:
     e = e/2
 count = count+1

print(count)
         


 
      
      
             


    
    
     
                

         
           




### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
n = list(map(int, input().split()))
k = n[0]
x = n[1]
s1 = n - x - 1
s2 = n + x - 1
print(list(range( (s1), (s2 + 1)  )))

### FIXED CODE ###

n = list(map(int, input().split()))
k = n[0]
x = n[1]
s1 = x - k + 1
s2 = x + k - 1
a1 = list(range( (s1), (s2 + 1)  ))
print(" ".join(list(map(str, a1))))
A, B, K = list(map(int, input().split()))

S = [1]

for i in range(2,min(A,B)):
    if A % i == 0 or B % i == 0:
        S.append(i)

S.sort(reverse=True)

print(S[K-1])

### FIXED CODE ###

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

S = [1]

for i in range(2,min(A+1,B+1)):
    if A % i == 0 and B % i == 0:
        S.append(i)

S.sort(reverse=True)

print(S[K-1])
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

class BIT:
    """ Binary Indexed Tree """

    def __init__(self, n):
        # 0-indexed
        n += 1
        nv = 1
        while nv < n:
            nv *= 2
        self.size = nv
        self.tree = [0] * nv

    def sum(self, i):
        """ [0, i]を合計する """
        s = 0
        i += 1
        while i > 0:
            s += self.tree[i-1]
            i -= i & -i
        return s

    def add(self, i, x):
        """ 値の追加：添字i, 値x """
        i += 1
        while i <= self.size:
            self.tree[i-1] += x
            i += i & -i

    def get(self, l, r=None):
        """ 区間和の取得 [l, r) """
        # 引数が1つなら一点の値を取得
        if r is None: r = l + 1
        res = 0
        if r: res += self.sum(r-1)
        if l: res -= self.sum(l-1)
        return res

N = INT()
A = LIST()

bit = BIT(N)
ans = 0
for i in range(N):
    # 自分より左にある、自分より小さな数の個数
    if bit.sum(A[i]) == 0:
        ans += 1
    bit.add(A[i], 1)
print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N = INT()

C = list2d(10, 10, 0)
for a in range(1, N+1):
    s = int(str(a)[0])
    t = int(str(a)[-1])
    C[s][t] += 1

ans = 0
for i in range(1, 10):
    for j in range(1, 10):
        ans += C[i][j] * C[j][i]
print(ans)
#include <stdio.h>
#include <math.h>
#define PI 3.14159265 
int main()
{
    int r; float ans;
    scanf("%d",&r);
    ans = 2*r*PI;
    printf("%f",ans);

    return 0;
}

### FIXED CODE ###

import math
r = int(input())
print(2*r*math.pi)
N = 123
N_sp = N.split("")

if(N_sp == 7):
  print("Yes")
  else:
    print("No")

### FIXED CODE ###

N = input()
list_N = list(N)
list_N = [int(s) for s in list_N]

if(list_N[0] != 7 and list_N[1] != 7 and list_N[2] != 7):
  print("No")
else:
  print("Yes")
import bisect

N = int(input())
a = list(map(int,input().split(' ')))
a.sort()

def do(n,fathers):
       
    if n == N:
        return
    
    for father in fathers:
        son = a.pop(bisect.bisect_left(a,father)-1)
        if son >= father:
            return
        else:
            fathers.append(son)
            
    do(n+1,fathers)
    


fathers = [a.pop()]
do(0, fathers) 
if len(fathers) == 2**N:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

N = int(input())
A = sorted((int(x) for x in input().split()))
 
parent = [A[-1]]
rest = A[:-1]
bl = True
for _ in range(N):
    next_parent = []
    next_rest = []
    for p in parent[::-1]:
        while rest:
            x = rest.pop()
            if x < p:
                next_parent.append(x)
                break
            else:
                next_rest.append(x)
                continue
    parent += next_parent
    parent.sort()
    rest = rest + next_rest[::-1]
 
bl = len(parent) == (2**N)
answer = 'Yes' if bl else 'No'
print(answer)
A,B, C= list(map(int,input().split()))
if C - (A - B) >= 0
    print(C - (A - B))
else
    print(0)

### FIXED CODE ###

A,B, C= list(map(int,input().split()))
print(C-min(A-B,C))
n, d = [int(s) for s in input().split(" ")]
pts = []
for _ in range(n):
  pts.append([int(s) for s in input().split(" ")])

def dist(x, y):
  sum = 0
  for xx, yy in zip(x, y):
    sum += (xx - yy)**2
  return math.sqrt(sum)

cnt = 0
for i in range(n):
  for j in range(i + 1, n):
    d = dist(pts[i], pts[j])
    if int(d) == d:
      cnt += 1

print("%d" % cnt)

### FIXED CODE ###

import math
n, d = [int(s) for s in input().split(" ")]
pts = []
for _ in range(n):
  pts.append([int(s) for s in input().split(" ")])

def dist(x, y):
  sum = 0
  for xx, yy in zip(x, y):
    sum += (xx - yy)**2
  return math.sqrt(sum)

cnt = 0
for i in range(n):
  for j in range(i + 1, n):
    d = dist(pts[i], pts[j])
    if int(d) == d:
      cnt += 1

print("%d" % cnt)
if A == 5:
  if B == 5:
    if C == 7:
      print(YES)
    else:
      print(NO)
  else if B == 7:
    if C == 5:
      print(YES)
    else:
      print(NO)
  else:
    print(NO)
else if A == 7:
  if B == 5 and C == 5:
    print(YES)
else:
  print(NO)

### FIXED CODE ###

n = list(map (int, input().split()))
if n.count(int (5)) == 2 and n.count(int (7)) == 1:
  print("YES")
else:
  print("NO")
from functools import reduce
mod = 998244353

def C(a, b, m):
  return 1 if b == 0 else reduce(lambda x, y:(x*y)%m, range(a-b+1, a+1))*pow(reduce(lambda x,y:(x*y)%m, range(1, b+1)), m-2, m)
  
N, M, K = map(int, input().split())
ans = (M*pow(M-1, (N-k-1), mod))%mod
k = 1
while k <= K and k < N:
  a = ((C(N, k, mod)-1)*M*pow(M-1, (N-k-1), mod))%mod
  ans += a
  k += 1
print(ans)


### FIXED CODE ###

from functools import reduce
mod = 998244353

N, M, K = map(int, input().split())
C = 1
ans = (M*pow(M-1, (N-1), mod))%mod
k = 1
while k <= K and k < N:
  C *= (N-k)*pow(k, mod-2, mod)
  C %= mod
  a = (C*M*pow(M-1, (N-k-1), mod))%mod
  ans = (ans+a)%mod
  k += 1
print(ans)
n=int(input())  #数値入力 「N」だけの入力のとき

S = []
for _ in range(n):
    S.append(set(input()).sort())
print(n-len(set(S)))

### FIXED CODE ###

import collections
N=int(input())
S=[''.join(sorted(input())) for _ in range(N)]
C=collections.Counter(S)
ans=0
for si in set(S):
  n=C[si]
  ans+=n*(n-1)//2
print(ans)
N = int(input())
 
s = "abcdefghijklmnopqrstuvwxyz"
ans = ""
n, m = 0, 0
 
for i in range(1, 1000):
    m += 26**i
    if N <= m:
        n = i
        break

for i in reversed(range(n)):
    a, b = divmod(N, 26**i)
    N = b
    if not a == 0:
      ans += s[a-1]
    else:
      ans += s[25]

print(ans)

### FIXED CODE ###

N = int(input())

s = "abcdefghijklmnopqrstuvwxyz"
ans = ""
n, m = 0, 0

for i in range(1, 1000):
    m += 26 ** i
    if N <= m:
        n = i
        break

for i in range(n):
    a, b = divmod(N, 26)
    N = a
    if b == 0:
        ans += s[25]
        N -= 1
    else:
        ans += s[b-1]

ans1 = ''.join(list(reversed(ans)))
print(ans1)
def add(A,B,T):
  C=T//A
  return C*B
  
A=int(input())
B=int(input())
T=int(input())
print(add(A,B,T))

### FIXED CODE ###

def add(A,B,T):
  C=T//A
  return C*B
  
a=list(map(int,input().split()))
print(add(a[0],a[1],a[2]))
n=int(input())
dat = list(map(int, input().split()))

flag=True
int count = 0

while flag==True:
     for i in range(n):
         if dat[i]%2==1:
             flag=False
              break
          else:
              dat[i] = dat[i]/2
       count = count+1

print(count)
         


 
      
      
             


    
    
     
                

         
           




### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
#@hoshikawa1309  Qiita
#dfsを用いて累積和を計算する
import sys
sys.setrecursionlimit(10 ** 6)
def input():#これをしないとTLE
    return sys.stdin.readline()[:-1]#このスライスは1行ずつ入力？
N , Q = map(int,input().split())
graph = [[] for _ in range(N)]
point = [0] * N
for _ in range(N - 1):
    a , b = map(int,input().split())
    graph[a - 1].append(b - 1)#0-index
    graph[b - 1].append(a - 1)#0-index
for _ in range(Q):
    a , b = map(int,input().split())
    a = a - 1#0-index
    point[a] += b#問題で与えられる、その頂点についての得点をプラス
# 初期状態だと前の値がないためデフォルト引数に-1を代入
def dfs(now , prev = -1):#いま見ている頂点と、どの頂点から来たかが引数
    #for文で、いま見ている頂点に繋がっている、次に頂点について以下ABC
    for next in graph[now]:
        # 次のノードが前に参照した値の時はcontinue何もしない
        if next == prev:       continue　　#A.逆走防止
        # 現在の値を次のポイントに加算することで累積和をとる
        point[next] += point[now]#B.実際の処理は、この累積和だけ
        # 次のノードと現在のノードを引数にdfsを継続する
        dfs(next , now)#C.深く探索するイメージ
dfs(0)
print(*point)

### FIXED CODE ###

#ika tako
import sys
n, q = map(int, input().split())
lines = sys.stdin.readlines()
links = [set() for _ in range(n)]
for line in lines[:n - 1]:
    a, b = map(int, line.split())
    a -= 1
    b -= 1
    links[a].add(b)
    links[b].add(a)
adds = [0] * n
for line in lines[n - 1:]:
    p, x = map(int, line.split())
    p -= 1
    adds[p] += x
ans = [-1] * n
q = [(0, 0)]
while q:
    v, a = q.pop()
    a += adds[v]
    ans[v] = a
    for u in links[v]:
        if ans[u] == -1:
            q.append((u, a))
print(*ans)
import math
from functools import reduce


def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


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

lcm_num = lcm_list(a) - 1
ans = 0
for i in range(N):
    ans += lcm_num % a[i]
print(ans)



### FIXED CODE ###

from functools import reduce


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


def lcm_base(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


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

lcm_num = lcm_list(a) - 1
ans = 0
for i in range(N):
    ans += lcm_num % a[i]
print(ans)
import sys
sys.setrecursionlimit(1000000)

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

def g(X, t):
    if X<=t:
        return 0
    return 1+g(t, t)+g(X-t, t)

def f(t):
    c = 0
    for i in A:
        c += g(i, t)
    return c<=K

left, right = -1, 10**10
while right-left>1:
    m = (right+left)//2
    if f(m):
        right = m
    else:
        left = m

print(right)


### FIXED CODE ###

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

def f(t):
    if t!=0:
        c = 0
        for i in A:
            c += i//t if i!=t else 0
        return c<=K
    else:
        return all(i<=t for i in A)

left, right = -1, 10**10
while right-left>1:
    m = (right+left)//2
    if f(m):
        right = m
    else:
        left = m

print(right)
n = int(input())

for i in range(1, 9)
	for j in range(1, 9)
    	if n == i * j:
			print("Yes")
			break

print("No")


### FIXED CODE ###

n = int(input())
ans = ('No')
for i in range(1,10):
    for j in range(1,10):
        if i * j == n:
            ans = ('Yes')
            break
print(ans)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=[]
            count = 1
            while temp%i==0:
                if(count not in cnt):
                  cnt.append(count)
                  count = 0 
                count += 1
                temp //= i
            arr.append(len(cnt))

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

n = int(input())
num = factorization(n)
if(n == 1):
  num = [1]

print(sum(num)) 


### FIXED CODE ###

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

    if temp!=1:
        arr.append(1)

    if arr==[]:
        arr.append(1)

    return arr

n = int(input())
num = factorization(n)
if(n == 1):
  num = [0]

print(sum(num))
n =int(input())
if n%2=0:
  print(n//2)
else:
  print(n//2+1)


### FIXED CODE ###

n =int(input())
if n%2==0:
  answer = n//2
  print(answer)
else:
  answer = n//2+1
  print(answer)
import math
import fractions

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

a = list(set(map(int, input().split(" "))))

s = a[0]
for i in range(1, len(a)):
    s = s * a[i] // math.gcd(s, a[i])

if s > M:
    print(0)

else:
    m = s // 2
    print((M-m)//s + 1)

### FIXED CODE ###

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

a = list(set(map(int, input().split(" "))))
g = a.copy()

while not any(x%2 for x in g): g = [i //2 for i in g]

if not all(x%2 for x in g): print(0); exit(0)

def gcd(a, b):

    while b:

        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd(a, b)


tot = 1

for x in a: tot = lcm(tot, x//2)
print((M//tot+1)//2)
N = int(input())
S = list(input())

lst = [chr(ord('a') + i) for i in range(26)]
lst_up = list(map(str.upper,lst))
for i in range(len(S)):
    if int(lst_up.index(S[i])+N) <= len(lst_up):
        S[i] = lst_up[lst_up.index(S[i])+N]
    elif  int(lst_up.index(S[i])+N) > len(lst_up):
        S[i] = lst_up[lst_up.index(S[i])+N-26]

lst_2 = "".join(S)
print(lst_2)

### FIXED CODE ###

N = int(input())
S = list(input())

lst = [chr(ord('a') + i) for i in range(26)]
lst_up = list(map(str.upper,lst))

for i in range(len(S)):
    if int(lst_up.index(S[i])+N+1) <= len(lst_up):
        S[i] = lst_up[lst_up.index(S[i])+N]
    elif  int(lst_up.index(S[i])+N+1) > len(lst_up):
        S[i] = lst_up[lst_up.index(S[i])+N-26]

lst_2 = "".join(S)
print(lst_2)
N = int(input())
L = [input()]
 
for _ in range(N-1):
    a = input()
    imin = 0
    imax = len(L)-1
    l = 0
 
    while (imin<imax):
        l = (imin+imax)//2
        if (a==L[l]):
            break
        elif (a>L[l]):
            imin = min(l+1,len(L)-1)
        else:
            imax = max(l-1,0)
    
    if(imax==imin)       
    	if (a>L[imin]):
        	L.insert(imin+1,a)
    	elif (a<L[imin]):
        	L.insert(imin,a)
            
print(len(L))
N = int(input())
L = [input()]

for _ in range(N-1):
    a = input()
    imin = 0
    imax = len(L)-1
    l = 0

    while (imin<imax):
        l = (imin+imax)//2
        if (a==L[l]):
            break
        elif (a>L[l]):
            imin = min(l+1,len(L)-1)
        else:
            imax = max(l-1,0)
    
    if(imax==imin):     
    	if (a>L[imin]):
        	L.insert(imin+1,a)
    	elif (a<L[imin]):
        	L.insert(imin,a)
            
print(len(L))

### FIXED CODE ###

N = int(input())
L = set([input() for _ in range(N)])
print(len(L))
n = map(int,input().split())

def count(x):
    res = 0
    for i in range(1, x + 1):
        if x % i == 0:
            res += 1
    return res

res = 0
for x in range(1, n+1, 2):
    if count(x) == 8:
        res += 1

print(res)


### FIXED CODE ###



n = int(input())

def count(x):
    res = 0
    for i in range(1, x + 1):
        if x % i == 0:
            res += 1
    return res

res = 0
for x in range(1, n+1, 2):
    if count(x) == 8:
        res += 1

print(res)
def gcd(a,b):
    if b==0: return a
    return gcd(b,a%b)

n=int(input())
x=[*map(int,input().split())]
a=x[0]
for i in range(1,n):
    a=gcd(a,x[i])
print(a)

### FIXED CODE ###

def gcd(a,b):
    if b==0: return a
    return gcd(b,a%b)

n=int(input())
x=list(map(int,input().split()))
a=x[0]
for i in range(1,n):
    a=gcd(a,x[i])
print(a)
S = str(input())
N = int(input())
ans = []
tmp = 0

for i in range(0,len(S)):
  tmp = N+ord(S[i])
  if tmp >= 91:
    tmp = tmp - 26
  ans.append(chr(tmp))

print("".join(ans)) 

### FIXED CODE ###

N = int(input())
S = str(input())
ans = []
tmp = 0

for i in range(0,len(S)):
  tmp = N+ord(S[i])
  if tmp >= 91:
    tmp = tmp - 26
  ans.append(chr(tmp))

print("".join(ans))
n,q = map(int(input().split()))
s = input()
m = list(map(int,input().split for i in range(q)))
count = [0]*(N+1)

for i in range(n):
    if S[i:i+2] == 'AC':
        comu[i+1] = comu[i] + 1
    else:
        comu[i+1] = comu[i]

for l,r in list:
    print(count[r-1]-count[l-1])
~


### FIXED CODE ###

n,q = map(int,input().split())
s = input()
m = [list(map(int,input().split())) for i in range(q)]
count = [0]*(n+1)
 
for i in range(n):
    if s[i:i+2] == 'AC':
        count[i+1] = count[i] + 1
    else:
        count[i+1] = count[i]
 
for l,r in m:
    print(count[r-1]-count[l-1])
a, b, c = map(int, input().split())
if c -2*(a+b)>0:
    print('Yes')
elif 4*a*b < (c-b-a)**2 or math.sqrt(a*b)<(c-b-a)/2:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a, b, c = map(int, input().split())
if c -2*(a+b)>0:
    print('Yes')
elif c>=a+b and 4*a*b < (c-b-a)**2:
    print('Yes')
elif a == c or b == c:
    print('No')
else:
    print('No')
x, n = list(map(int, input().split()))

if n != 0:
  p = list(map(int, input().split()))
  lists = []
  for i in range(1, 101):
    if i in p:
      continue
    lists.append(i)

  ans = lists[0]
  dist = abs(lists[0]-x)
  for i in range(len(lists)):
    if dist > abs(lists[i]-x):
      ans = lists[i]
      dist = abs(lists[i]-x)
  print(ans)
  
else:
  print(x)

### FIXED CODE ###

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

if n != 0:
  p = list(map(int, input().split()))
  lists = []
  for i in range(0, 102):
    if i in p:
      continue
    lists.append(i)

  ans = lists[0]
  mins = abs(lists[0] - x)
  for i in range(1, len(lists)):
    dist = abs(lists[i]-x)
    if mins > dist:
      ans = lists[i]
      mins = dist
      
  print(ans)
else:
  print(x)
# -*- coding: utf-8 -*-
a, b, c, d, e = map(int, input().split())

suuji_list = ["", a, b, c, d, e]

print(list.index(0))


### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b, c, d, e = map(int, input().split())
 
suuji_list = ["", a, b, c, d, e]
 
print(suuji_list.index(0))
N,M = map(int,(input().split()))
A = list(map(int,input().split()))
cost = sorted(list(zip([[2,5,5,4,5,6,3,7,6][a-1] for a in A],A)),key = lambda x: (x[0],-x[1]))

#同じ画数の数字を除く
tmp = len(cost)
i = 1
while i < tmp:
    if cost[i][0] == cost[i-1][0]:
        cost.pop(i)
        tmp = len(cost)
    else:
        i += 1
cost.sort(key = lambda x:-x[1])

dp = [0]*(N+1)
for i in range(2,N+1):
    dp[i] = max([0]+[dp[i-a]+1 for a,_ in cost if i >= a])

n = N
out = ""
i = 0
while n:
    c , a = cost[i]
    if dp[n-c] ==dp[n]-1:
        n -= c
        out += str(a)
    else:
        i+=1
print(out)

### FIXED CODE ###

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

cost = sorted(list(zip([[2,5,5,4,5,6,3,7,6][a-1] for a in A],A)),key = lambda x: (x[0],-x[1]))

#同じ画数の数字を除く
tmp = len(cost)
i = 1
while i < tmp:
    if cost[i][0] == cost[i-1][0]:
        cost.pop(i)
        tmp = len(cost)
    else:
        i += 1
cost.sort(key = lambda x:-x[1])

dp = [0]+[-10]*(N)
for i in range(2,N+1):
    dp[i] = max([-10]+[dp[i-a]+1 for a,_ in cost if i >= a])

n = N
out = ""
i = 0
while n:
    c , a = cost[i]
    if (n>=c) and (dp[n-c] == dp[n]-1):
        n -= c
        out += str(a)
    else:
        i+=1
print(out)