Harryxun/stf_run huggingface dataset:
from collections import Counter


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


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

c = Counter(a)
new = []
for key, val in c.most_common():
    if val == 1:
        new.append(key)

ans = 0
for i in new:
    div = make_divisors(i)
    if len(set(new) & set(div)) == 1:
        ans += 1åç

print(ans)


### FIXED CODE ###

from collections import Counter

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

# new = [key for key, val in Counter(a).most_common() if val == 1]
prime = [1] * 1000010

for i in set(a):
    # if prime[i]:
    for j in range(i + i, 1000001, i):
        prime[j] = 0

c = Counter(a)
ans = 0
for i in a:
    if prime[i] and c[i] == 1:
        ans += 1
print(ans)
if __name__ == '__main__':
    A = input()
    B = input()
    C = input()
    K = input()

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

### FIXED CODE ###

if __name__ == '__main__':
    A =[]
    B = input()
    A = B.split()

    a = int(A[0])
    b = int(A[1])
    c = int(A[2])
    k = int(A[3])

    if a > k:
        print(k)
    elif (a+b) > k:
        print(a)
    else:
        ans = 2*a-k+b
        print(ans)
w,h,x,y=map(int,input().split())
ans=0
if (2*x==w)&(2*y==h):
  ans=1
print((w*h)/2,ans)


### FIXED CODE ###

X,A=map(int,input().split())
print(0) if X<A else print(10)
import numpy as np
S=input()
Q=int(input())
q=[[0 for i in range(3)] for j in range(Q)]
onecntr=0
for i in range(Q):
    tmp=input().split()
    if(tmp[0]=="1"):
        q[i][0]=1
    else:
        q[i][0]=2
        q[i][1]=int(tmp[1])
        q[i][2]=tmp[2]
    

for i in range(Q):
    if(q[i][0]==1):
        onecntr+=1
    else:
        
        if(onecntr%2==0):
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        else:
            S=S[::-1]
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        onecntr=0
    
if(onecntr%2==1):
    S=S[::-1]

print(S)
            
    
    

### FIXED CODE ###

S=input()
cntr=0
if(S=="AAA" or S=="BBB"):
    print("No")
else:
    print("Yes")
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
def is_primes(n):
    primes = [1]*n
    primes[0] =0
    primes[1] =0
    for i in range(2,int(n**0.5)+1):
        if primes[i] ==1:
            for j in range(2*i,n,i):
                primes[j] = 0
    return primes

def factorize(n,prms):
    idx=0
    b = prms[idx]
    fct = []
    while b * b <= n:
        cnt =0
        while n % b == 0:
            n //= b
            cnt +=1
        if cnt >=1:
            fct.append((b,cnt))
            
        idx+=1
        b = prms[idx]
    if n > 1:
        fct.append((n,1))
    return fct

n =ni()
A = lma()
if max(A)==1:
    print("pairwise coprime")
mx= 10**6+100
prms = is_primes(mx)
d=collections.Counter()
for a in A:
    fct = factorize(a,prms)
    #print(fct)
    for fc,cnt in fct:
        d[fc]+=1
        if d[fc]==n:
            break
f1=True # pp or sp
f2=True # sp or other
for num,cnt in d.items():
    if cnt==n:
        f2=False #other
        break
    else:
        if cnt==1:
            pass
        else:
            f1=False
            break
if f2==False:
    print("not coprime")
elif f1 and f2:
    print("pairwise coprime")
elif f1==False:
    print("setwise coprime")


### FIXED CODE ###

ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
gcd=math.gcd

def is_primes(n):
    primes = [1]*n
    primes[0] =0
    primes[1] =0
    for i in range(2,int(n**0.5)+2):
        if primes[i] ==1:
            for j in range(2*i,n,i):
                primes[j] = 0
    return primes
def factorize(n,primes):
    fct = [(1,1)]
    for b in primes:#primes ::sorted
        if b**2 > n:
            break
        cnt =0
        while n % b == 0:
            n //= b
            cnt +=1
        if cnt >=1:
            fct.append((b,cnt))
    if n > 1:
        fct.append((n,1))
    return fct

n =ni()
A = lma()
mx= 10**6+10
prms = is_primes(mx)
prms2=[i for i in range(mx) if prms[i]]
#print(prms2)
d=collections.Counter()
for a in A:
    fct = factorize(a,prms2)
    #print(fct)
    for fc,cnt in fct:
        if fc==1:continue
        d[fc]+=1

f1=True # pp or sp
f2=True # sp or not p
for num,cnt in d.items():
    if cnt==n:
        f2=False #numが全体で共通の約数になる not coprime
        break
    else:
        if cnt==1:## 素
            pass
        else:
            f1=False

if f2==False:
    print("not coprime")
elif f1:
    print("pairwise coprime")
else:
    print("setwise coprime")
L, N = map(int,input().split())
S = [input() for i in range(N)]

S.sort()


print("".join(S))

### FIXED CODE ###

N, L = map(int,input().split())
S = [input() for i in range(N)]

S.sort()


print("".join(S))
N = int(input())
S = 0
for i in range(1, N+1):
  if i%3==0 or i%5==0 or i%3==0 and i%5==0
	continue
  S+=i
print(S) 

### FIXED CODE ###

N = int(input())
out = 0
for i in range(1,N+1):
    if i%3 == 0 and i%5 == 0 or i%3==0 or i%5==0:
       continue
    out += i
print(out)
a,x,x=input().split()
x,b,x=input().split()
x,x,c=input().split()
print(a+b+c)


### FIXED CODE ###

a=input()[0]
b=input()[1]
c=input()[2]
print(a+b+c)
def flip_sq(sy, sx):
    gy = sy
    gx = sx
    while True:
        if sx == W - 1:
            if tiles[sy+1][sx] == "#":
                sy += 1
            else:
                break
        elif tiles[sy][sx+1] == "#":
            sx += 1
            if sy == H - 1:
                break
            if tiles[sy+1][sx] == "#":
                sy += 1
        else:
            break
    for y in range(gy, sy+1):
        for x in range(gx, sx+1):
            tiles[y][x] = flip[tiles[y][x]]

    print(tiles)

H, W = [int(i) for i in input().strip().split(" ")]
tiles = []
for i in range(H):
    tiles.append([i for i in input().strip()])

tile = {"#":1, ".":0}
flip = {"#":".", ".":"#"}
count = []
for i in range(H):
    count.append([])
    for j in range(W):
        count[i].append(0)

count[0][0] = tile[tiles[0][0]]
if tile[tiles[0][0]]:
    flip_sq(0, 0)

for y in range(H):
    for x in range(W):
        if y == 0:
            if x == 0:
                continue
            count[y][x] = count[y][x-1] + tile[tiles[y][x]]
        else:
            if x == 0:
                count[y][x] = count[y-1][x] + tile[tiles[y][x]]
            else:
                count[y][x] = min(count[y-1][x], count[y][x-1]) + tile[tiles[y][x]]
        if tile[tiles[y][x]]:
            flip_sq(y, x)

print(count[H-1][W-1])

### FIXED CODE ###

H, W = map(int, input().split())
grid = [list(input().strip()) for _ in range(H)]

ans = [[0] * W for _ in range(H)]

if grid[0][0] == "#":
    ans[0][0] = 1

for i in range(H):
    for j in range(W):
        if i == 0 and j == 0:
            continue

        r = H*W
        d = H*W
        if j > 0 and grid[i][j] != grid[i][j-1] and grid[i][j-1] == ".":
            r = 1 + ans[i][j-1]
        elif j > 0:
            r = ans[i][j-1]

        if i > 0 and grid[i][j] != grid[i-1][j] and grid[i-1][j] == ".":
            d = 1 + ans[i-1][j]
        elif i > 0:
            d = ans[i-1][j]
        ans[i][j] = min(r, d)

print(ans[H-1][W-1])
S = raw.input()
S.replace("2017","2018")

print(S)

### FIXED CODE ###

S = input()
S=S.replace("2017","2018")

print(S)
#D
from collections import deque
Str = str(input())
Q = int(input())
S = deque()
S.append(Str)
A = 0
B = []
C = []

for i in range(Q):
    a = list(map(str, input().split()))
    if a[0] == '1':
        if A%2==0:
            if len(B)>1:
                B_=B.reverse()
                S.extendleft(B_)
                B = []
            elif len(B) == 1:
                S.extendleft(B)
                B = []
            if len(C) > 0:
                S.extend(C)
                C = []
        else:
            if len(C)>1:
                C_=C.reverse()
                S.extendleft(C_)
                C = []
            elif len(C) == 1:
                S.extendleft(C)
                C = []
            if len(B) > 0:
                S.extend(B)
                B = []
        A += 1
    elif a[1] == '1':
        B.append(a[2])
    else:
        C.append(a[2])

if a[0] != '1':
    if A%2==0:
        if len(B)>1:
            B_=B.reverse()
            S.extendleft(B_)
            B = []
        elif len(B) == 1:
            S.extendleft(B)
            B = []
        if len(C) > 0:
            S.extend(C)
            C = []
    else:
        if len(C)>1:
            C_=C.reverse()
            S.extendleft(C_)
            C = []
        elif len(C) == 1:
            S.extendleft(C)
            C = []
        if len(B) > 0:
            S.extend(B)
            B = []

if A%2 != 0:
    S.reverse()
print(''.join(S))


### FIXED CODE ###

#D
from collections import deque
Str = str(input())
Q = int(input())
S = deque(list(Str))
#S.append(list(Str))
#上の方法ではダメ
A = 0
B = []
C = []

for i in range(Q):
    a = list(map(str, input().split()))
    if a[0] == '1':
        if A%2==0:
            if len(B)>1:
                S.extendleft(B)
                B = []
            elif len(B) == 1:
                S.extendleft(B)
                B = []
            if len(C) > 0:
                S.extend(C)
                C = []
        else:
            if len(C)>1:
                S.extendleft(C)
                C = []
            elif len(C) == 1:
                S.extendleft(C)
                C = []
            if len(B) > 0:
                S.extend(B)
                B = []
        A += 1
    elif a[1] == '1':
        B.append(a[2])
    else:
        C.append(a[2])

if a[0] != '1':
    if A%2==0:
        if len(B)>1:
            S.extendleft(B)
            B = []
        elif len(B) == 1:
            S.extendleft(B)
            B = []
        if len(C) > 0:
            S.extend(C)
            C = []
    else:
        if len(C)>1:
            S.extendleft(C)
            C = []
        elif len(C) == 1:
            S.extendleft(C)
            C = []
        if len(B) > 0:
            S.extend(B)
            B = []

if A%2 != 0:
    S.reverse()
print(''.join(S))
import typing as tp
import fileinput

def frog(stones: tp.List[int]) -> int:
    stone_cost = [0]
    for i in range(1, len(stones)):
        single_step_cost = abs(stones[i] - stones[i - 1])
        if i == 1:
            stone_cost.append(single_step_cost)
        else:
            double_step_cost = abs(stones[i] - stones[i - 2])
            stone_cost.append(min(single_step_cost + stone_cost[-1], double_step_cost + stone_cost[-2]))

    return stone_cost[-1]
    

inp = fileinput.input()
inp.readline()
stones = [int(v) for v in inp.readline().split(" ")]
frog(stones)


### FIXED CODE ###

import fileinput
    
def frog(stones):
    stone_cost = [0]
    for i in range(1, len(stones)):
        single_step_cost = abs(stones[i] - stones[i - 1])
        if i == 1:
            stone_cost.append(single_step_cost)
        else:
            double_step_cost = abs(stones[i] - stones[i - 2])
            stone_cost.append(min(single_step_cost + stone_cost[-1], double_step_cost + stone_cost[-2]))
    
    return stone_cost[-1]
    
    
inp = fileinput.input()
inp.readline()
stones = [int(v) for v in inp.readline().split(" ")]
print(frog(stones))
import numpy as np
a = input()
int(n), int(l) = a.split(" ")
apples = [i for i in range(n)]
abs_app = np.abs(apples)
m = abs_app.min()
app = np.array(apples)
app = app + l - 1
print(app[abs_app != m].sum())


### FIXED CODE ###

import numpy as np
a = input()
n, l = [int(i) for i in a.split(" ")]
apples = np.array([i for i in range(n)])
aji = apples + l
abss = [np.abs(aji[apples != i].sum() - aji.sum()) for i in range(n)]
i = abss.index(np.min(abss))
print(aji[apples != i].sum())
number,length=input().split()
input_list=[]
out=''
for i in range(number):
    input_list.append(input())
input_list.sort()
for i in input_list:
    out+=i
print(out)

### FIXED CODE ###

number,length=map(int,input().split())
input_list=[]
out=''
for i in range(number):
    input_list.append(input())
input_list.sort()
for i in input_list:
    out+=i
print(out)
import math

a = int(input())
b = int(input())

print(str((a * b) // math.gcd(a, b)))

### FIXED CODE ###


def gcd(a,b):
    x = max(a,b)
    y = min(a,b)
    if x%y == 0:
        return y
    else:
        while x%y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z



def lcm(m,n):
    return int(m * n/gcd(m,n))

a,b = map(int,input().split())
print(lcm(a,b))
if __name__='__main__':
    m,n = map(int,input().split())
    if abs(m-n)>1:
        print('Alice')
    else:
        print('Brown')
   

### FIXED CODE ###

if __name__=='__main__':
    m,n = map(int,input().split())
    if abs(m-n)>1:
        print('Alice')
    else:
        print('Brown')
N=int(input())
ans=ceil(N/2)
print(ans)

### FIXED CODE ###

import math
N=int(input())
ans=math.ceil(N/2)
print(ans)
S=input()
s=0
for i in range(len(S)//2)
	if S[i] != S[-i-1]: s+=1
print(s)

### FIXED CODE ###

S=input()
s=0
for i in range(len(S)//2):
	if S[i] != S[-i-1]: s+=1
print(s)
n, m = map(int, input().split())

jouken_1 = []
jouken_2 = []
jouken_3 = []

for _ in range(m):
    array = tuple(map(int, input().split()))
    if array[0] == 1:
        jouken_1.append(array)
    elif array[0] == 2:
        jouken_2.append(array)
    else:
        jouken_3.append(array)

a = set(jouken_1)
b = set(jouken_2)
c = set(jouken_3)
a = list(a)
b = list(b)
c = list(c)

if len(a) > 1:
    print(-1)
    exit()
elif len(b) > 1:
    print(-1)
    exit()
elif len(c) > 1:
    print(-1)
    exit()

if n == 1:
    if len(b) > 0 or len(c) > 0:
        print(-1)
        exit()
    else:
        print(a[0][1])
elif n == 2:
    if len(c) > 0:
        print(-1)
        exit()
    elif a[0][1] == 0:
        print(-1)
        exit()
    elif len(b) == 0 and len(a) == 1:
        num = a[0][1] * 10
        print(num)
    else:
        num = b[0][1]+ a[0][1] * 10
        print(num)
elif n == 3:
    if a[0][1] == 0:
        print(-1)
        exit()
    if len(b) == 1:
        if len(c) == 1:
            num = a[0][1] * 100 + b[0][1] * 10 + c[0][1]
        else:
            num = a[0][1] * 100 + b[0][1] * 10
    else:
        if len(c) == 1:
            num = a[0][1] * 100 + c[0][1]
        else:
            num = a[0][1] * 100
    print(num)

### FIXED CODE ###

n, m = map(int, input().split())

jouken_1 = []
jouken_2 = []
jouken_3 = []

if m == 0:
    if n == 1:
        print(0)
        exit()
    elif n == 2:
        print(10)
        exit()
    else:
        print(100)
        exit()

for _ in range(m):
    array = tuple(map(int, input().split()))
    if array[0] == 1:
        jouken_1.append(array)
    elif array[0] == 2:
        jouken_2.append(array)
    elif array[0] == 3:
        jouken_3.append(array)

a = set(jouken_1)
b = set(jouken_2)
c = set(jouken_3)
a = list(a)
b = list(b)
c = list(c)
flag = False

if len(a) > 1:
    print(-1)
    exit()
elif len(a) == 1:
    a = a[0][1]
else:
    flag = True
    a = 0

if len(b) > 1:
    print(-1)
    exit()
elif len(b) == 1:
    b = b[0][1]
else:
    b = 0

if len(c) > 1:
    print(-1)
    exit()
elif len(c) == 1:
    c = c[0][1]
else:
    c = 0

if n == 1:
    if b > 0 or c > 0:
        print(-1)
        exit()
    for i in range(10):
        if i == a:
            print(a)
            exit()
    print(-1)
elif n == 2:
    if c > 0:
        print(-1)
        exit()
    if a == 0 and flag is True:
        a = 1
    for i in range(10, 100):
        if str(i)[0] == str(a) and str(i)[1] == str(b):
            print(i)
            exit()
    print(-1)
elif n == 3:
    if a == 0 and flag is True:
        a = 1
    for i in range(100, 1000):
        if str(i)[0] == str(a) and str(i)[1] == str(b) and str(i)[2] == str(c):
            print(i)
            exit()
    print(-1)
def sigma(N):
    return N*(N-1)//2


def find_max(N):
    for i in range(N+1):
        if sigma(i) > N:
            return i


def solve(N):
    Y = find_max(N)
    rem = sigma(Y)-N
    for i in range(1, Y):
        if i != rem:
            print(i)


N = int(input())
solve(N)


### FIXED CODE ###

def sigma(N):
    return N*(N+1)//2


def find_max(N):
    for i in range(N):
        if sigma(i) > N:
            return i
    return N


def solve(N):
    Y = find_max(N)
    rem = sigma(Y)-N
    for i in range(1, Y+1):
        if i != rem:
            print(i)


N = int(input())
solve(N)
s = input()
q = int(input())
t = 0
for i in range(q):
  Q = input()
  if Q == "1":
    t += 1
  else:
    a, f, c = Q.split()
    f = int(f)
    if (t + f) % 2 == 0:
      s = ''.join([s, c])
    else:
      s = ''.join([c, s])
if t % 2 == 1:
  print(s[::-1])
else:
  print(s)

### FIXED CODE ###

a = input()
if not (a == "AAA" or a =="BBB"):
  print("Yes")
else:
  print("No")
a, b, c = map(int, raw_input().split)
middle = (a + c)/2

if b == middle:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a, b, c = [ int(i) for i in input().split() ]
middle = (a + c)/2
 
if b == middle:
  print("YES")
else:
  print("NO")
N = input(int())
ans = 1
i = []
 
list = [i for i in input().split()]
 
for a in range(N-1):
  ans = ans * i[a]
 
if ans > 10**18:
    ans = "-1"
 
print(str(ans))

### FIXED CODE ###

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

ans = 1

if 0 in a:
    print("0")
    exit()

for i in a:
    ans *= i

    if ans > 10**18:
        print("-1")
        exit()
        
print(ans)
N = int(input())

res = 0
freq = {}

for i in range(0, 10):
    for j in range(0, 10):
        freq[f'{i}{j}'] = 0

for i in range(1, N):
    si = str(i)
    freq[f'{si[0]}{si[-1]}'] += 1
    
for i in range(1, N):
    si = str(i)
    res += freq[f'{si[-1]}{si[0]}']
        
print(res)

### FIXED CODE ###

from collections import defaultdict
N = int(input())

res = 0
freq = defaultdict(int)

for i in range(1, N+1):
    si = str(i)
    freq['{}{}'.format(si[0], si[-1])] += 1
    
for i in range(1, N+1):
    si = str(i)
    res += freq['{}{}'.format(si[-1], si[0])]
        
print(res)
n=int(input())
l=sorted([int(input()) for _ in range(n)])
s=sum(l)
for i in l[::-1]:
  if i%10>0:k=s-i
print(s if s%10>0 else k)

### FIXED CODE ###

n=int(input())
l=sorted([int(input()) for _ in range(n)])
s=sum(l)
k=0
for i in l[::-1]:
  if i%10>0:k=s-i
print(s if s%10>0 else k)
N, M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for _ in range(N)]
BC.sort(key = lambda x: -x[1])

for B, C in BC:
  A.extend([C]*B)
  if len(A) > N*2:
    break
A.sort(reverse = True)
print(sum(A[:N]))


### FIXED CODE ###

N, M = map(int,input().split())
A = list(map(int,input().split()))
BC = [list(map(int,input().split())) for _ in range(M)]
BC.sort(key = lambda x: -x[1])

for B, C in BC:
  A.extend([C]*B)
  if len(A) > N*2:
    break
A.sort(reverse = True)
print(sum(A[:N]))
a, b, c, d = map(int,input().split())


if (-(-c // b)) <= (-(-a // d):
    print('Yes')
else:
    print('No')


### FIXED CODE ###

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

tk_count = -(-c // b)
ao_count = -(-a // d)

if tk_count <= ao_count:
    print('Yes')
else:
    print('No')
N,Q = map(int, input().split())
S = input()

t = [0]*Q
d = [0]*Q
for q in range(Q):
    t[q],d[q] = input().split()


s1 = 0
sN = N-1

for q in reversed(range(Q)):
    if t[q] == S[s1] and d[q] == 'L':
        s1 += 1
    elif s1 > 0:
        if d[q] == 'R' and S[s1-1] == t[q]:
            s1 -= 1
    if t[q] == S[sN] and d[q] == 'R':
        sN -= 1
    elif sN < N-1:
        if d[q] == 'L' and S[sN+1] == t[q]:
            sN += 1
    #print(s1,sN)


print(sN-s1+1)

### FIXED CODE ###

N,Q = map(int, input().split())
S = input()

t = [0]*Q
d = [0]*Q
for q in range(Q):
    t[q],d[q] = map(str, input().split())


s1 = 0
sN = N-1

for q in reversed(range(Q)):
    if t[q] == S[s1] and d[q] == 'L':
        s1 += 1
    elif s1 > 0:
        if d[q] == 'R' and S[s1-1] == t[q]:
            s1 -= 1
    if t[q] == S[sN] and d[q] == 'R':
        sN -= 1
    elif sN < N-1:
        if d[q] == 'L' and S[sN+1] == t[q]:
            sN += 1
    if s1 > sN:
        break
    #print(s1,sN)


print(sN-s1+1)
n = int(input())
a = list(map(int, input().split()))
MOD = 10 ** 9 + 7
def gcd(a, b):
    if b ==0:
        return a
    else:
        return gcd(b,a%b)

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

mk = 1
for i in a:
    mk = lcm(mk, i)


k = 0
for j in a:
    k = (k +  mk / j) %MOD
print(int(k %MOD))


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
MOD = 10 ** 9 + 7
def gcd(a, b):
    if b ==0:
        return a
    else:
        return gcd(b,a%b)

mk = 1
for i in a:
    mk = mk * i//gcd(mk, i)

k = 0
for j in a:
    k +=  mk // j
print(k %MOD)
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
start = 0
end = max(A)
while abs(start - end) > 1:
    ans = abs(end + start) // 2
    cnt = 0
    for i in range(N):
        cnt += math.floor(A[i]/ans - 0.0000000001)
        if cnt > K: #ダメだったら
            start = ans
            break
    else: #オッケーだったら
        end = ans
        continue

cnt = 0
for i in range(N):
    cnt += math.floor((A[i] / ans) - 0.000000000001)

if cnt > K:  # ダメだったら
    print(ans + 1)
else:  # オッケーだったら
    print(ans)


### FIXED CODE ###

import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
start = 0
end = max(A)
ans = abs(end + start) // 2 + 1
while abs(start - end) > 1:
    ans = abs(end + start) // 2
    cnt = 0
    for i in range(N):
        cnt += math.floor(A[i]/ans - 0.0000000001)
        if cnt > K: #ダメだったら
            start = ans
            break
    else: #オッケーだったら
        end = ans
        continue

cnt = 0
for i in range(N):
    cnt += math.floor((A[i] / ans) - 0.000000000001)

if cnt > K:  # ダメだったら
    print(ans + 1)
else:  # オッケーだったら
    print(ans)
import math
for i in range(int(input())):
    a = int(input())
    b = int(input())
    if int(math.log10(a+b) + 1) > 80:
        print("overflow")
    else:
        print(a+b)

### FIXED CODE ###

for i in range(int(input())):
    a = int(input())
    b = int(input())
    if a+b >= 10**80:
        print("overflow")
    else:
        print(a+b)
def bin_search(l, r, x):
	if x > 1e9:
		return 1e9
	mid = (l+r)//2
	if r-l == 1:
		if a*r+ b*len(str(r)) <= x:
			return int(r)
		elif a*l+ b*len(str(l)) <= x:
			return int(l)
		else:
			return 0
	elif a*mid+b*len(str(mid)) > x:
		return bin_search(l, mid-1, x)
	else:
		return bin_search(mid+1, r, x)


a, b, x = map(int, input().split())
if a+b > x:
	print(0)
else:
	print(bin_search(1, 1e9, x))

### FIXED CODE ###

s = input()
if s == 'MON':
	print(6)
elif s == 'TUE':
	print(5)
elif s == 'WED':
	print(4)
elif s == 'THU':
	print(3)
elif s == 'FRI':
	print(2)
elif s == 'SAT':
	print(1)
else:
	print(7)
N = int(input())
S = list(input())
ans = 0
 
for i in range(N):
    first_s = S[i]
    for j in range(i+1, N):
        if S[j] != first_s:
            second_s = S[j]
            for k in range(j+1, N):
                if k == 2*j-i:
                    if (S[k] != first_s) and (S[k] != second_s):
                        continue
                if (S[k] != first_s) and (S[k] != second_s):
                    ans += 1
print(ans)

### FIXED CODE ###

N = list(input())

if "7" in N:
    print("Yes")
else:
    print("No")
H,N=map(int,input().split())

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

  if sum(A)>=H:
    print("Yes")
    else:
      print('No')

### FIXED CODE ###

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

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

if sum(A)>=H:
    print("Yes")
else:
    print('No')