Harryxun/stf_run huggingface dataset:
def gcd(a,b):
    if a<b:
     c=a
     a=b
     b=c
     
    c=a%b
    
    if c==0:
     return gcd(b,c)
    else:
     return b
 
def lcm(a,b):
    c=gcd(a,b)
    return a/c*b
 
 
 
n=int(input())
t=[0]*n
 
for lop2 in range(n):
    t[lop2]=int(input())
 
ans=t[0]
 
for lop in range(1,n):
    ans=lcm(ans,t[lop])
print(int(ans))


### FIXED CODE ###

'''
def gcd(a,b):
    if a<b:
     c=a
     a=b
     b=c

    c=a%b

    if c==0:
     return b
    else:
     return gcd(b,c)
'''

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

def lcm(e,f):
    c=gcd(e,f)
    g=e*f
    return g//c



n=int(input())
t=[0]*n

for lop2 in range(n):
    t[lop2]=int(input())

ans=t[0]

for lop in range(1,n):
    ans=lcm(ans,t[lop])
print(int(ans))
N, X = map(int, input().split())
m = [int(input(i)) for i in range(N)]
XX -= sum(m)
ans = N + XX // min(m)
print(ans)

### FIXED CODE ###

n,x = map(int,input().split())
m = [int(input()) for _ in range(n)]
x -= sum(m)
ans = n + x//min(m)
print(ans)
def a(A B)
	return A * B

### FIXED CODE ###

A, B = map(int, input().split())
print(A*B)
import sys
sys.setrecursionlimit(1000000)
N,M=map( int, raw_input().split() )
S=raw_input()

C=[ [0 for i in range(2) ] for j in range(N+1)  ] 	#C[i][0] A no kazu , C[i][1] B no kazu
nl=[ set() for i in range(N+1) ]
D=[ 0 for i in range(N+1) ]		#Mukouka flag   1:delete

for i in range(M):
	a,b=map(int, raw_input().split() )
	nl[a].add(b)
	nl[b].add(a)

	if a==b:
		if S[a-1]=="A": 
			C[a][0]+=1			
		elif S[a-1]=="B":
			C[a][1]+=1			
	else:
		if S[a-1]=="A": 
			C[b][0]+=1
		elif S[a-1]=="B":
			C[b][1]+=1
		if S[b-1]=="A": 
			C[a][0]+=1
		elif S[b-1]=="B":
			C[a][1]+=1


def func(i):
	print "i,C::",i,C,nl
	if D[i]==1: return
	a_cnt=C[i][0]
	b_cnt=C[i][1]

	if a_cnt==0 or b_cnt==0:
		D[i]=1	#Mukouka flag wo on
		for x in nl[i]:
			if D[x]==1: continue

			if a_cnt>0: C[x][0]-=1;C[i][0]-=1
			elif b_cnt>0: C[x][1]-=1;C[i][1]-=1
			if C[x][0]==0 or C[x][1]==0:
				func(x)


for i in range(1,N+1):
	func(i)



for i,x in enumerate(D):
	if i==0:continue
	if x==0:
		for u in nl[i]:
			if D[u]==0:
				print "Yes"
				quit()
else:
	print "No"



### FIXED CODE ###

from heapq  import heappush, heappop

N,M=map( int, raw_input().split() )
S="z"+raw_input()
num=[ [ 0 for i in range(2) ] for j in range(N+1) ] 

nl= [ [] for j in range(N+1) ] 

deleted=[ 0 for j in range(N+1) ] 

for i in range(M):
	a,b=map( int, raw_input().split() )
	if not b in nl[a]:
		nl[a].append(b)
		nl[b].append(a)
		if S[b]=="A":  num[a][0]+=1
		elif S[b]=="B":  num[a][1]+=1
		if S[a]=="A":  num[b][0]+=1
		elif S[a]=="B":  num[b][1]+=1

hq=[]

for i in range(1,N+1):
	if num[i][0]==0 or num[i][1]==0:
		heappush(hq,i)



while hq:
	x=heappop(hq)
	if deleted[x]==1: continue
	if num[x][0]==0 or num[x][1]==0:

		deleted[x]=1
		for u in nl[x]:
			if deleted[u]==0:
				if S[x]=="A": num[u][0]-=1						
				elif S[x]=="B": num[u][1]-=1
			
		#	print "x,u,num:::",x,u,num
			if ( num[u][0]==0 or num[u][1]==0 ) and deleted[u]==0:
				heappush(hq,u)
			#	print "x,u,hq:::",x,u,hq

				

	

#print "num:::",num
#print "deleted:::",deleted
#print "nl:::",nl

if sum(deleted[1:])==N:
	print "No"
else:
	print "Yes"
While True:
	H,W = map(int,input().split())
	if H ==0 and W == 0:
		break
	
	for i in (range H):
		for j in (range W):
			print("#", end="")
		print("")

### FIXED CODE ###


while True:
	H,W = map(int,input().split())
	if H ==0 and W == 0:
		break
	
	for i in range (H):
		for j in range (W):
			print('#', end="")
		print("")
	print("")
from collections import defaultdict

D,G=map( int, raw_input().split() )
P=[ map( int, raw_input().split() ) for i in range(D) ] 

N=10**5+2000
dp= [   [ float("inf") for i in range(N+1)] for idx in range(D+1)  ]
dp[0][0]=0

for idx, x  in enumerate(P):
	m=idx+1	#money
	p,c=x[0], x[1]/100
	for i in range(N,-1,-1):
		if dp[idx][i]!=float("inf"):
			for j in range(p,-1,-1):	# j= problems count   , idx = score of a problem
				if j==p:
					dp[idx+1][i+m*j+c]=min( dp[idx+1][i+m*j+c] , dp[idx][i]+j )
				else:
					dp[idx+1][i+m*j]=min( dp[idx+1][i+m*j] , dp[idx][i]+j )


ans=float("inf")

for i in range(G/100,N):
	ans=min(ans, dp[-1][i])

print ans

### FIXED CODE ###

D,G=map(int,raw_input().split())

A=[map(int,raw_input().split()) for i in range(D)]

N=1000
dp=[ [ float("-inf") for i in range(N+100)]  for j in range(D) ] 

p=A[0][0]
c=A[0][1]


for i in range(1,p+1):
	if i==p: dp[0][i]=i*100+c
	else: dp[0][i]=i*100

for i in range(D):
	dp[i][0]=0



for k in range(1,D):
	p=A[k][0]    # number of problems per line
	c=A[k][1]    # bonus

	for i in range(N):		         #dp[k][i]
		for j in range(1,p+1):    #number of problems per line
			dp[k][i+j]=max( dp[k][i+j], dp[k-1][i]+j*(k+1)*100, dp[k-1][i+j] )
		dp[k][i+j]=max( dp[k][i+j], dp[k-1][i]+j*(k+1)*100+c,dp[k-1][i+j] )



for idx,i in enumerate(dp[D-1]):
	if i>=G:
		print idx
		quit()
print((10 ** int(input()) - 2 * 9 ** int(input()) + 8 ** int(input())) % (10 ** 9 + 7))

### FIXED CODE ###

print(abs(int(input())-1))
n = int(input())
L = [list(map(int,input().split()))]
if max(L)<sum(L)-max(L):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = int(input())
L = list(map(int,input().split()))
if max(L)<sum(L)-max(L):
  print("Yes")
else:
  print("No")
x = int(input())
if x == 1:
  print(0,-1)
  exit()
  
def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a

c = []
fct = factorize(x)
for div in divisorize(fct):
    c.append(num(div))
    
chk = False
#print(c)
for s in c:
  if chk:
    break
  for i in range(10000):
    if (i+s)**5-i**5 > x:
      break
    if (i+s)**5-i**5 == x:
      ans = (i+s,i)
      chk = True
      break
  for p in range(1,10000):
    j = -1*p
    #print(s,(j+s)**5-j**5)
    if (j+s)**5-j**5 > x:
      break 
    if (j+s)**5-j**5 == x:
      ans = (j+s,j)
      chk = True
      break 

print(*ans)

### FIXED CODE ###

x = int(input())
if x == 1:
  print(0,-1)
  exit()
  
def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a

c = []
fct = factorize(x)
for div in divisorize(fct):
    c.append(num(div))
    
chk = False
for s in c:
  if chk:
    break
  for i in range(1000):
    if (i+s)**5-i**5 > x:
      break
    if (i+s)**5-i**5 == x:
      ans = (i+s,i)
      chk = True
      break
  if s <1000:    
    for p in range(s,1000):
      j = -1*p
      #print(s,(j+s)**5-j**5)
      if (j+s)**5-j**5 > x:
        break 
      if (j+s)**5-j**5 == x:
        ans = (j+s,j)
        chk = True
        break 
  for ww in range(1,(s+1)//2)[::-1]:
    jj = -1*ww
    if (jj+s)**5-jj**5 > x:
      break    
    if (jj+s)**5-jj**5 == x:
      ans = (jj+s,jj)
      chk = True
      break 
print(*ans)
import itertools

n, m = map(int, input().split(' '))
x = map(int, input().split(' '))
if n >= m:
    print(0)
else:
    x = sorted(x)
    seq = [i for i in range(1,m)]
    locations = list(itertools.combinations(seq,n-1))
    best_sc = None
    for location in locations:
        sc = 0
        for i in range(0,n):
            g = None
            if i == 0:
                g = x[:location[i]]
            elif i == n-1:
                g = x[location[i-1]:]
            else:
                g = x[location[i-1]:location[i]]
            sc += max(g) - min(g)
        if (best_sc is None) or (best_sc > sc):
            best_sc = sc
    print(best_sc)


### FIXED CODE ###

n, m = map(int, input().split(' '))
x = list(map(int, input().split(' ')))
if n >= m:
    print(0)
else:
    x.sort()
    d = [x[i+1] - x[i] for i in range(m-1)]
    d.sort()
    #print(d)
    print(sum(d[:m-n]))
s = input().split(" ")
n = int(s[0])
k = int(s[1])
sp = input().split(" ")
p = [int(pstr) for pstr in sp]

num = 1

for i in range(k - 1):
  if p[i] > p[i + 1]:
    num += 1
    break   
for i in range(n - k):
  if p[i] > p[i + 1] or p[i + k] > p[i + k +1]:
    num += 1
  else:
print(num)

### FIXED CODE ###

class MinSlideWindow:
    def __init__(self,p):
        self.pos_list = []
        self.val_list = p
        self.start_idx = 0

    def put(self,pos):
        val = self.val_list[pos]

        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[-1]
            val1 = self.val_list[pos1]
            if val1 >= val:
                del self.pos_list[-1]
            else:
                break
        self.pos_list.append(pos)

    def get(self,pos):
        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[self.start_idx]
            if pos1 <= pos:
                self.start_idx += 1
            else:
                break

    def min(self):
        pos1 = self.pos_list[self.start_idx]
        val1 = self.val_list[pos1]
        return val1

class MaxSlideWindow:
    def __init__(self,p):
        self.pos_list = []
        self.val_list = p
        self.start_idx = 0
        
    def put(self,pos):
        val = self.val_list[pos]

        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[-1]
            val1 = self.val_list[pos1]
            if val1 <= val:
                del self.pos_list[-1]
            else:
                break
        self.pos_list.append(pos)

    def get(self,pos):
        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[self.start_idx]
            if pos1 <= pos:
                del self.pos_list[self.start_idx]
            else:
                break

    def max(self):
        pos1 = self.pos_list[self.start_idx]
        val1 = self.val_list[pos1]
        return val1




s = input().split(" ")
n = int(s[0])
k = int(s[1])
sp = input().split(" ")
p = [int(pstr) for pstr in sp]
num = 1
ident = True
rv_pos = -1

minw = MinSlideWindow(p)
maxw = MaxSlideWindow(p)

for i in range(k - 1):
    if p[i] > p[i + 1]:
        rv_pos = i
        ident = False
    
for i in range(k-1):
    minw.put(i)
    maxw.put(i)

for i in range(1,n - k + 1):
    
    maxw.put(i + k - 2)
    minw.put(i + k - 2)
    maxw.get(i-1)
    minw.get(i-1)

    """    
    for j in range(k - 1):
        if p[i + j] > p[i + j +1]:
            break
    else:
        if not ident:
            ident = True
            num += 1
        continue
    """
    if p[i + k - 2] > p[i + k - 1]:
        rv_pos = i + k - 2
        

    
    if rv_pos < i:
        if not ident:
            ident = True
            num += 1
        continue
            

    if p[i - 1] > minw.min() or p[i + k - 1] < maxw.max():
        num += 1

    
print(num)
X=int(input())
L=[]
for i in range(2,32):
  k=2
  while(True):
    if (i**k<=X):
      L.append(i**k)
    else:
      break
    k+=1
print(max(L))


### FIXED CODE ###

X=int(input())
L=[1]
for i in range(2,32):
  k=2
  while(True):
    if (i**k<=X):
      L.append(i**k)
    else:
      break
    k+=1
print(max(L))
# encoding:utf-8

import sys
sys.setrecursionlimit(100000)

def main():
	n = int(input())
	vers = [list(map(int, input().split())) for _ in range(n - 1)]
	q, k = list(map(int, input().split()))
	queries = [list(map(int, input().split())) for _ in range(q)]

	n = 10 ** 5
	vers = [[i + 1, i + 2, 10 ** 9] for i in range(n - 1)]
	print(vers)

	new_vers = mapping(n, vers)
	dist = calcMinDist(n, new_vers, k, queries)
	print(dist)
	calcQueries(dist, queries, k)
	
def mapping(n, vers):
	new_vers = {i :[] for i in range(n)}
	for ver in vers:
		new_vers[ver[0] - 1].append((ver[1], ver[2]))
		new_vers[ver[1] - 1].append((ver[0], ver[2]))
	return new_vers

def calcMinDist(n, new_vers, k, queries):
	dist = [- 1 for _ in range(n)]
	flag = [False for _ in range(n)]
	dist[k - 1] = 0
	flag[k - 1] = True
	dfs(new_vers, dist, flag, k)
	return dist

def dfs(new_vers, dist, flag, frm):
	flag[frm - 1] = True
	vs = new_vers[frm - 1]
	for v in vs:
		if flag[v[0] - 1] == False:
			dist[v[0] - 1] = dist[frm - 1] + v[1]
			new_ver, dist, flag, _ = dfs(new_vers, dist, flag, v[0])

	return [new_vers, dist, flag, frm]

def calcQuery(dist, query, k):
	print(dist[query[0] - 1] + dist[query[1] - 1])

def calcQueries(dist, queries, k):
	for query in queries:
		calcQuery(dist, query, k)

if __name__ == '__main__':
	main()

### FIXED CODE ###

# encoding:utf-8
import sys
 
def main():
	n = int(input())
	vers = [list(map(int, input().split())) for _ in range(n - 1)]
	q, k = list(map(int, input().split()))
	queries = [list(map(int, input().split())) for _ in range(q)]
 
	#n = 10 ** 5
	#vers = [[i + 1, i + 2, 10 ** 9] for i in range(n - 1)]
 
	new_vers = mapping(n, vers)
	dist = calcMinDist(n, new_vers, k, queries)
	calcQueries(dist, queries, k)
	
def mapping(n, vers):
	new_vers = {i :[] for i in range(n)}
	for ver in vers:
		new_vers[ver[0] - 1].append((ver[1], ver[2]))
		new_vers[ver[1] - 1].append((ver[0], ver[2]))
	return new_vers
 
def calcMinDist(n, new_vers, k, queries):
	dist = [- 1 for _ in range(n)]
	flag = [False for _ in range(n)]
	dist[k - 1] = 0
	flag[k - 1] = True
	dfs(new_vers, dist, flag, k)
	return dist
 
def dfs(new_vers, dist, flag, frm):
	flag[frm - 1] = True
	vs = new_vers[frm - 1]
	for v in vs:
		if flag[v[0] - 1] == False:
			dist[v[0] - 1] = dist[frm - 1] + v[1]
			new_ver, dist, flag, _ = dfs(new_vers, dist, flag, v[0])
 
	return [new_vers, dist, flag, frm]
 
def calcQuery(dist, query, k):
	print(dist[query[0] - 1] + dist[query[1] - 1])
 
def calcQueries(dist, queries, k):
	for query in queries:
		calcQuery(dist, query, k)
 
if __name__ == '__main__':
	sys.setrecursionlimit(1000000)
	main()
N, X = map(int, input().split())
L = [int(i) for i in input().split()]

ans = 0
D = 0
while(D <= X):
    D += L[ans]
    ans += 1

print(ans)

### FIXED CODE ###

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

ans = 1
ct = 0
D = 0
while True:
    D += L[ct]
    if D <= X:
        ct += 1
        ans += 1
    else:
        break
    if ct > N - 1:
        break

print(ans)
# def i():
#     yield "100000"
#     yield " ".join([str(i) for i in range(100000)])
# input = i().__next__
def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    cur = 1
    nums = []
    for i in range(N):
        if A[i] == 0:
            cur *= 1
            nums.append(0)
            continue
        #A[i] != 0
        cnt = 0
        for j, n in enumerate(nums):
            if n == A[i] - 1:
                if cnt == 0:
                    nums[j] += 1
                cnt += 1
        cur *= cnt
        cur %= 10**9+7
        # print(nums)
    m = [3, 6, 6]
    print((cur * m[len(nums)-1]) % (10**9+7))
main()

### FIXED CODE ###

# def i():
#     yield "100000"
#     a = 0
#     b = 0
#     c = 0
#     l = []
#     for i in range(100000):
#         import random
#         r = random.randint(0, 2)
#         if r == 0:
#             l.append(str(a))
#             a += 1
#         elif r == 1:
#             l.append(str(b))
#             b += 1
#         else:
#             l.append(str(c))
#             c += 1
#     yield " ".join(l)
# input = i().__next__
def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    cur = 1
    nums = []
    for i in range(N):
        if A[i] == 0:
            cur *= 1
            nums.append(0)
            continue
        #A[i] != 0
        cnt = 0
        for j, n in enumerate(nums):
            if n == A[i] - 1:
                if cnt == 0:
                    if len(nums) <= j:
                        print(0)
                        return
                    nums[j] += 1
                cnt += 1
        cur *= cnt
        cur %= 10**9+7
        # print(nums)
    m = [0, 3, 6, 6]
    if len(nums) >= 4:
        print(0)
        return
    
    print((cur * m[len(nums)]) % (10**9+7))
main()
n = int(input())
dll =[]
for i in range(n):
    command = input().split()
    if command[0] == 'insert':
        dll.insert(0, command[1])
    elif command[0] == 'delete':
        try:
            dll.remove(command[1])
        except:
            pass
    elif command[0] == 'deleteFirst':
        dll.pop(0)
    else:
        dll.pop()
    print(dll[i], sep=" ")
#print(*dll)

### FIXED CODE ###

from collections import deque

n = int(input())
dll = deque()
for i in range(n):
    command = input().split()
    if command[0] == 'insert':
        dll.appendleft(command[1])
    elif command[0] == 'delete':
        try:
            dll.remove(command[1])
        except:
            pass
    elif command[0] == 'deleteFirst':
        dll.popleft()
    else:
        dll.pop()
print(*dll)
N=int(input())
S=input()
print("No") if N%2!==0  else print("No") if S[:(N/2)+1:] != S[(N/2)+1::]
      else print("Yes")

### FIXED CODE ###

N = int(input())
S = input()
print("Yes" if S[:N//2] == S[N//2:] else "No")
import numpy as np

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

if N == 0:
    print(X)
else:
    A = [i for i in range(1,101)]

    for i in P:
        A.remove(i)

    a = (np.array(A) - X)**2
    j = np.argmin(a)
    print(A[j])

### FIXED CODE ###

import numpy as np

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

if N == 0:
    print(X)
else:
    A = [i for i in range(1,210)]

    for i in P:
        A.remove(i)

    a = (np.array(A) - X)**2
    j = np.argmin(a)
    if (A[j] - X)**2 >= X**2:
        print(0)
    else:
        print(A[j])
def dfs(h, w): # startからの距離の最大値をreturnする
    res = -1
    dist = [[-1] * W for _ in range(H)]
    stack = []
    dist[h][w] = 0
    stack.append([h, w])
    while stack:
        h, w = stack.pop()
        for i in range(4):
            nh = h + dy[i]
            nw = w + dx[i]
            if nh >= H or nh < 0 or nw >= W or nw < 0:
                continue
            if s[nh][nw] == "#":
                continue
            if dist[nh][nw] == -1:
                dist[nh][nw] = dist[h][w] + 1
                stack.append([nh, nw])
            if dist[nh][nw] != -1:
                if dist[nh][nw] > (dist[h][w]+1):
                    dist[nh][nw] = dist[h][w] + 1
                    stack.append([nh, nw])
    for i in range(H):
        if res <= max(visited[i]):
            res = max(visited[i])
    return res

H, W = map(int, input().split())
s = [input() for _ in range(H)]
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
m = -1
dist = 0
for i in range(H):
    for j in range(W):
        if s[i][j] == ".":
            dist = dfs(i, j)
            if m <= dist:
                m = dist
print(m)

### FIXED CODE ###

def dfs(h, w): 
    m = -1
    visited = [[-1] * W for _ in range(H)]
    stack = []
    visited[h][w] = 0
    stack.append([h, w])
    while stack:
        h, w = stack.pop()
        for i in range(4):
            nh = h + dy[i]
            nw = w + dx[i]
            if nh >= H or nh < 0 or nw >= W or nw < 0:
                continue
            if s[nh][nw] == "." and visited[nh][nw] == -1:
                visited[nh][nw] = visited[h][w] + 1
                stack.append([nh, nw])
            if s[nh][nw] == "." and visited[nh][nw] != -1:
                if visited[nh][nw] > (visited[h][w]+1):
                    visited[nh][nw] = visited[h][w] + 1
                    stack.append([nh, nw])
    for i in range(H):
        if m <= max(visited[i]):
            m = max(visited[i])
    return m

H, W = map(int, input().split())
s = [input() for _ in range(H)]
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
m = -1
dist = 0
for i in range(H):
    for j in range(W):
        if s[i][j] == ".":
            dist = dfs(i, j)
            if m <= dist:
                m = dist
print(m)
a, b = int(input().split())
if a < b:
 print("a<b")
if a > b:
 print("a>b")
if a == b:
 print("a==b")

### FIXED CODE ###

a, b = map(int,input().split())
if a < b:
 print("a < b")
if a > b:
 print("a > b")
if a == b:
 print("a == b")
from sys import stdin
import math
b, c, tanshin, choshin = [int(x) for x in stdin.readline().rstrip().split()]
 


choshin12 = choshin * (360 / 60)
if choshin == 0 :
	choshin12 = 360/60
 
tanshin12 = (tanshin * 60 + choshin) * 360 / (12 * 60)
 
rad =  abs( choshin12 - tanshin12 )
 
# 線対称で書いちゃったよ。。。点対称じゃんね
if rad >= 180 :
	rad = 360-rad
 
# 余弦定理とか生まれて初めてです・・・
a = (b ** 2) + (c ** 2) - (2 * b * c * math.cos(math.radians(rad)))
 
# print (math.cos(math.radians(rad)))
 
a = math.sqrt(a)

# print(tanshin)
# print(choshin)
 
# print(tanshin12)
# print(choshin12)
 
# print(rad)
print (a)

### FIXED CODE ###

b = int(input())
a = b % 10

if a == 2 or a == 4 or a == 5 or a == 7 or a == 9 :
  print("hon")
elif a == 0 or a == 1 or a == 6 or a == 8 :
  print("pon")
elif a == 3 :
  print("bon")
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

cnt = 0
step = 0

for i in range(N):
    if A[step] == B[i]:
        cnt += 1
    else:
        step += 1

C = B[cnt:]+B[:cnt]

flag = 0
for i in range(N):
    if A[i] == C[i]:
        flag = 1
        break

if flag == 1:
    print('No')
else:
    print('Yes')
    print(' '.join(map(str, B[cnt:]+B[:cnt])))

### FIXED CODE ###

x = int(input())
if x == 0:
    print(1)
else:
    print(0)
print(sum(p)-max([int(input()) for i in range(int(input()))])//2)

### FIXED CODE ###

p = [int(input()) for i in range(int(input()))]
print(sum(p)-max(p)//2)
s=str(input())
t=str(input())
length=len(s)
count=0
for i in range(s):
	if s[i]==t[i]:
		pass
	else:
		count+=1
print(count)

### FIXED CODE ###

s=str(input())
t=str(input())
length=len(s)
count=0
for i in range(length):
	if s[i]==t[i]:
		pass
	else:
		count+=1
print(count)
import math

def readInt():
	return int(input())

def readInts():
	return list(map(int, input().split()))

def readChars():
	return input().split()

s = input().reverse()

ai = [0]*len(s)
si = [0]*len(s)

p = 2019

for i in range(len(s)):
	(int(s[i])*pow(10,i))%p

### FIXED CODE ###

import math

def readInt():
	return int(input())

def readInts():
	return list(map(int, input().split()))

def readChars():
	return input().split()

s = reversed(input())

ai = 0
si = 0

p = 2019
countarr = [0]*2019

for i, j in enumerate(s):
	ai = (int(j)*pow(10,i,p))%p
	si = (si+ai)%p
	countarr[si]+=1

res = countarr[0]
for i in range(p):
	c = countarr[i]
	res += c*(c-1)//2

print(res)
n = int(input())
A = map(int, input().split())

ai = max(A)
A.remove(ai)

Asub = [abs(ai/2 -a) for a in A]
aj = A[Asub.index(min(Asub))]

print(ai + " " + aj)

### FIXED CODE ###

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

ai = max(A)
A.remove(ai)

Asub = [abs(ai/2 -a) for a in A]
aj = A[Asub.index(min(Asub))]

print('{} {}'.format(ai, aj))
N , M =map(int,input().split())
A_n =list(map(int,input().split()))

B_n=sorted(A_n,reverse =True)
i =0
count =0
while B_n[i] >= sum(B_n)/(4*M):
    i +=1
    count +=1
if count >= M:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

B_n=sorted(A_n,reverse=True)

if B_n[M-1] >= sum(B_n)/(4*M) :
    print('Yes')
else:
    print('No')