Harryxun/stf_run huggingface dataset:
def gcd(a, b):
    if b == 0:
        return a

    return gcd(b, a%b)

N = int(input())
t = []
for _ in range(N):
    t.append(int(input()))

lcm = max(t)

for i in range(N):
    if lcm % t[i] != 0:
        lcm = lcm * t[i] / gcd(lcm, lcm%t[i])

print(int(lcm))

### FIXED CODE ###

from fractions import gcd
import sys
input = sys.stdin.readline

n = int(input())
ans = 1
for _ in range(n):
    t = int(input())
    ans = ans*t//gcd(ans, t)
print(ans)
import sys

def add_count(addnum, relations, counters, nodelist):
  new_nodelist = []
  for node in nodelist:
    if node not in relations:
      continue
    else:
      new_nodelist = new_nodelist + relations[node]
      for child in relations[node]:
        counters[child-1] += addnum
  
  if len(new_nodelist) == 0:
    return counters
  else:
    return add_count(addnum, relations, counters, new_nodelist)

N, Q = map(int, sys.stdin.readline().split())
alist = list(list(map(int, sys.stdin.readline().split())) for i in range(N-1))
qlist = list(list(map(int, sys.stdin.readline().split())) for i in range(Q))

counters = [0 for i in range(N)]
relations = {}
for a in alist:
  if a[0] not in relations:
    relations[a[0]] = [a[1]]
  else:
    if a[1] not in relations[a[0]]:
      relations[a[0]].append(a[1])
    
for q in qlist:
  counters[q[0]-1] += q[1]
  counters = add_count(q[1], relations, counters, [q[0]])

print(' '.join(map(str,counters)))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
input=lambda :sys.stdin.readline()

def sol():

  N,Q = map(int,input().split())
  graph = [[] for i in range(N)]
  ans = [0 for i in range(N)]
  for _ in range(N-1):
    a,b = map(int,input().split())
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)

  for _ in range(Q):
    p, x = map(int,input().split())
    ans[p-1] += x 
 
  def dfs(v,p=-1):
    for u in graph[v]:
      if u == p: continue
      ans[u] += ans[v]
      dfs(u,v)
  dfs(0)
  print(*ans)

sol()
a=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
N=int(input())
li=list(input())
for i in li:
  num=a.index(i)+N
  if num > 26:
    num-=26
  print(a[num],end="")  


### FIXED CODE ###

dic={
     "A":1,
     "B":2,
     "C":3,
     "D":4,
     "E":5,
     "F":6,
     "G":7,
     "H":8,
     "I":9,
     "J":10,
     "K":11,
     "L":12,
     "M":13,
     "N":14,
     "O":15,
     "P":16,
     "Q":17,
     "R":18,
     "S":19,
     "T":20,
     "U":21,
     "V":22,
     "W":23,
     "X":24,
     "Y":25,
     "Z":26

}

gyaku={
    1:"A",
    2:"B",
    3:"C",
    4:"D",
    5:"E",
    6:"F",
    7:"G",
    8:"H",
    9:"I",
    10:"J",
    11:"K",
    12:"L",
    13:"M",
    14:"N",
    15:"O",
    16:"P",
    17:"Q",
    18:"R",
    19:"S",
    20:"T",
    21:"U",
    22:"V",
    23:"W",
    24:"X",
    25:"Y",
    26:"Z"
}
N=int(input())
li=list(input())

for i in range(len(li)):
  a=dic[li[i]]+N
  if a>26:
    a-=26
  li[i]=gyaku[a]
for i in range(len(li)):
  print(li[i],end="")
count = 0

while True :
 if x == 0 : break
  x = int(input())
  count += 1
  print("Case {}: {}".format(count,x))

### FIXED CODE ###

i = 0

while True:
 n = int(input())
 i += 1
 if n == 0:
  break
 print("Case {}: {}".format(i, n))
A = [map(int, input().split())]
print("win" if sum(A) >= 22 else "bust")

### FIXED CODE ###

A = list(map(int, input().split()))
print("win" if sum(A) < 22 else "bust")
N,Q = list(map(int,input().split()))

connections = [[] for i in range(N+1)]

for i in range(N-1):
    a,b = list(map(int,input().split()))
    connections[a].append(b)
    connections[b].append(a)

add_list = [0]*(N+1)

for i in range(Q):
    p,x = list(map(int,input().split()))
    add_list[p] += x

ans = [0]*(N+1)
checked = [False]*(N+1)
def add(point,num):
    ans[point] += num
    checked[point] = True
    for c in connections[point]:
        if checked[c]:
            continue
        else:
            add(c,num+add_list[c])
        
add(1,add_list[1])

for i in range(1,N):
    print(ans[i],end=' ')
print(ans[N])

### FIXED CODE ###

import sys
def main():
    input = sys.stdin.readline
    N,Q = list(map(int,input().split()))
    edges = [[] for i in range(N+1)]
    for i in range(N-1):
        a,b = list(map(int,input().split()))
        edges[a].append(b)
        edges[b].append(a)

    add = [0]*(N+1)
    for i in range(Q):
        p,x = list(map(int,input().split()))
        add[p] += x

    stack = [(1,0)]
    ans = [0]*(N+1)
    not_checked = [True]*(N+1)
    while stack:
        v,cnt = stack.pop()
        ans[v] = cnt+add[v]
        not_checked[v] = False
        for edge in edges[v]:
            if not_checked[edge]:
                stack.append((edge,ans[v]))

    for i in range(1,N):
        print(ans[i],end=" ")
    print(ans[N])

if __name__ == "__main__":
    main()
R, G, B, N = map(int, input().split())

ans = 0
for r in range(3001):
    if N - r * R < 0:
        continue
    for g in range(3001):
        tmp = N - r * R - g * G
        if tmp < 0:
            break
        if tmp % B == 0 and tmp // B >= 0:
            ans += 1

print(ans)


### FIXED CODE ###

R, G, B, N = map(int, input().split())

ans = 0
for r in range(N // R + 1):
    for g in range((N - R * r) // G + 1):
        tmp = N - r * R - g * G
        if tmp % B == 0:
            ans += 1

print(ans)
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

n,k=I()
a = l()
town = []
num = [0]*(n+1)
cnt = 1
num[0]=1

for i in range(n):
    num[a[cnt-1]] += 1
    if num[a[cnt-1]] == 2:
        ans = a[cnt-1]
        p = town.index(ans)
        b = town[p:]
        x = len(town)
        y = len(b)
        q = k-x+y
        if y == 0:
            print(town[n-1])
            sys.exit()
        if q < 0:
            print(town[k-1])
            sys.exit()
        z = q%y
        if z == 0:
            print(town[k-1])
        else:
            print(b[z-1])
        sys.exit()
        break
    town.append(a[cnt-1])
    cnt = a[cnt-1]


### FIXED CODE ###

import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

n,k=I()
a = l()
town = []
num = [0]*(n+1)
cnt = 1
num[0]=1

for i in range(n):
    num[a[cnt-1]] += 1
    if num[a[cnt-1]] == 2:
        ans = a[cnt-1]
        p = town.index(ans)
        b = town[p:]
        x = len(town)
        y = len(b)
        q = k-x+y
        if y == 0:
            print(town[n-1])
            sys.exit()
        if q < 0:
            print(town[k-1])
            sys.exit()
        z = q%y
        if z == 0:
            print(town[z-1])
        else:
            print(b[z-1])
        sys.exit()
        break
    town.append(a[cnt-1])
    cnt = a[cnt-1]
s=input()
s=s.split(' ')
maisuu = int(s[0])
maney  = int(s[1])

minn_man = int(maney/10000)
minn_go  = int((maney%10000)/5000)
minn_sen = int((maney%5000)/1000)
flg = True
min_maisuu = minn_man+minn_go+minn_sen
if min_maisuu <= maisuu <= maney/1000:
	minn_go  = maney / 5000 +1
	minn_sen = maney / 1000 +1
	minn_man += 1

	for man in range(0,minn_man):
		for go in range(0,minn_go):
			for sen in range(0,minn_sen):
				if man+go+sen == maisuu:
					if man*10000+ go*5000 + sen*1000 == maney:
						print(str(man)+","+str(go)+","+str(sen))
						flg=False
if flg:
	print('-1,-1,-1')


### FIXED CODE ###

s=input()
s=s.split(' ')
maisuu = int(s[0])
maney  = int(s[1])
 
minn_man = int(maney/10000)+1
minn_go  = int(maney / 5000) +1
for man in range(0,minn_man):
	for go in range(0,minn_go):
		# for sen in range(0,minn_sen):
		sen = maisuu - go - man
		if sen>=0:
			if man*10000+ go*5000 + sen*1000 == maney:
				print(str(man)+" "+str(go)+" "+str(sen))
				exit()
print('-1 -1 -1')
from functools import reduce
import math
import sys

K = int(input())

def gcd(*args):
  return reduce(math.gcd, args)

if K==1:
  print("1")
elif K==2:
  print("9")
  sys.exit()

ans = math.sum(K)
for i in range(1,K):
  for j in range(i+1,K+1):
    ans += 6*math.gcd(i,j)
  
for i in range(1,K-1):
  for j in range(i+1, K):
    for k in range(j+1, K+1):
      ans += 6 * gcd(i,j,k)
      
print(ans)

### FIXED CODE ###

from functools import reduce
import math
import sys
 
K = int(input())
 
def gcd(*args):
  return reduce(math.gcd, args)
 
if K==1:
  print("1")
  sys.exit()
elif K==2:
  print("9")
  sys.exit()
 
ans = K * (K+1)//2
for i in range(1,K):
  for j in range(i+1,K+1):
    ans += 6*math.gcd(i,j)
  
for i in range(1,K-1):
  for j in range(i+1, K):
    for k in range(j+1, K+1):
      ans += 6 * gcd(i,j,k)
      
print(ans)
n = int(input())
a = [int(i) for i in input().split()]

b = []
for n in a:
    if n % 2 == 0:
        b.append(n)

cnt = 0

while any(n % 2 == 0 for n in b):
    b = sorted(b)
    cnt += 1
    for i in range(len(b)):
        if i == len(b)-1:
            b[i] = b[i]/2
        else:
            b[i] = b[i]*3

    b = [n for n in b if n%2 == 0]

print(cnt)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]

b = [n for n in a if n%2 == 0]

cnt = 0
for n in b:
    while n % 2 != 1:
        n = n/2
        cnt += 1

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

match = 0
for l in range(len(A)):
    base = A[l]
    match += 1
    for r in range(l+1, len(A)):
        ando = base & A[r]
        if ando == 0:
            match += 1
        else:
            break
        base |= A[r]

print(match)



### FIXED CODE ###

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

print(max(A + B, A - B, A * B))
from heapq import heappush, heappop
from collections import deque
import itertools
from itertools import permutations
import sys
import bisect
sys.setrecursionlimit(10**6)
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
YNeos='YNeos'
GYN=['Yes','trumpet']
mo=10**9+7
imp='IMPOSSIBLE'

n,k=MI()
a=LI()
s=sum(a)
d=[1,s]
for i in range(2,int(s**0.5)+1):
    if s%i==0:
        d.append(i)
        if s//i!=i:
            d.append(s//i)

for i in d:
    if sum([a%i for j in a])!=0:
        continue
    else:
        x=[j%i for j in a]
        x.sort()
        for j in range(n-1):
            if 
        
for i in range(n):
    if a[i]<a[i+1]:
        a[i+1]-=1
    if a[i]<a[i+1]:
        print('No')
        exit()
print('Yes')

    
        


### FIXED CODE ###

from heapq import heappush, heappop
from collections import deque
import itertools
from itertools import permutations
import sys
import bisect
sys.setrecursionlimit(10**6)
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
YNeos='YNeos'
GYN=['Yes','trumpet']
mo=10**9+7
imp='IMPOSSIBLE'

a,b,c=MI()
print(max(0,c-a+b))
n = int(input())
a = input().split()
b = input().split()
c = input().split()

manzoku_do = 0
i = 0

manzoku_do += int(b[int(a[i])])
i += 1

while i < n:
  manzoku_do += int(b[int(a[i])])
  
  if a[i - 1] == a[i] - 1:
    manzoku_do += int(c[int(a[i -1])])
    i += 1
    
print(manzoku_do)

### FIXED CODE ###

n = int(input())
a = input().split()
b = input().split()
c = input().split()

manzoku_do = 0
i = 0

manzoku_do = 0
i = 0

manzoku_do += int(b[int(a[i]) - 1])
i += 1

while i < n:
  manzoku_do += int(b[int(a[i]) - 1])
  
  if int(a[i - 1]) -1  == int(a[i])-1 - 1:
    manzoku_do += int(c[int(a[i -1]) -1 ])
  i += 1
    
    
print(manzoku_do)
a.b = map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print(-1)

### FIXED CODE ###

a,b = map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print(-1)
N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
 
def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
 
l = 0
r = A[0]

while r-l>0:
  L = (r+l)//2
  if isfeasible(L):
    r = L
  else:
    l = L+1
print(r)

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
 
def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
 
l = 0
r = A[0]

while r-l>1:
  L = (r+l)//2
  if isfeasible(L):
    r = L
  else:
    l = L
print(r)
import itertools
x, y, z, k = map(int, input().split())
al = list(map(int,input().split()))
bl = list(map(int,input().split()))
cl = list(map(int,input().split()))
sum_list = [sum(i) for i in itertools.product(al, bl, cl)]
sum_list.sort(reverse=True)
for i in sum_list[:k]:
  print(i)

### FIXED CODE ###

import itertools
l = [int(input()) for i in range(5)]
k = int(input())
for i in itertools.combinations(l, 2):
  if i[1] - i[0] > k:
    print(':(')
    exit()
print('Yay!')
import math
def main():
  x = int(input())
  sum=0
  if x==0 or x==1:
    sum=x
  else:
    for i in range(2,int(math.sqrt(x))+1):
      j=2
      while True:
         if pow(i,j)<=x:
          if pow(i,j)>sum:
            sum=pow(i,j)
        else:
          break
        j+=1
  print(sum)
main()


### FIXED CODE ###

import math
def main():
  x = int(input())
  sum=0
  if x==0 or x==1:
    sum=x
  else:
    for i in range(2,int(math.sqrt(x))+1):
      j=2
      while True:
        if pow(i,j) <= x:
          if pow(i,j) > sum:
            sum=pow(i,j)
        else:
          break
        j+=1
  print(sum)
main()
import sys
N, M = map(int, input().split())
A = [int(input()) for i in range(M)]

for i in range(M-1):
    if A[i+1] == A[i]:
        print(0)
        sys.exit()
        
d = [0]*N
d[0] = 1
d[1] = 1
A = [-1] + A + [N+1]
def func(N):
    if d[N] > 0:
        return d[N]
    d[N] = func(N-1) + func(N-2)
    return d[N]
B = [A[i+1]-A[i]-2 for i in range(M+1)]
ans = 1
for i in range(M+1):
    ans = ans * func(B[i])
ans = ans%1000000007
print(ans)

### FIXED CODE ###

import sys
 
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]+[0] #jがはみ出ないように最後に付け足しておく
MOD=7+10**9 #%MODを忘れない
 
dp=[1]+[0]*n
 
j=0
#iにのぼることができるかを考える
for i in range(1,n+1):
  if i==a[j]:
    j+=1
  elif i>1:
    dp[i] = (dp[i-1] + dp[i-2])%MOD #-1,-2からの遷移を考える
  else:
    if i!=a[0]:
      dp[i] = dp[i-1]

print((dp[-1])%MOD)
n = int(input())

a = []
if n%2==0:
    if n // 10000 >= 1:
        for i in range(1, n//10000):
            q, mod = divmod(n, i)
            if mod == 0:
                a.append((i,q))
    
        max = max(a)
        print(sum(max)-2)
    
    else:
        for i in range(1, n//2):
            q, mod = divmod(n, i)
            if mod == 0:
                a.append((i,q))
    
        max = max(a)
        print(sum(max)-2)

else:
    print(n-1)

### FIXED CODE ###

import numpy as np
n = int(input())

ans = 10**18

for i in range(1, int(np.sqrt(n))+1):
    if n % i == 0:
        j = n//i
        ans = min(ans, i+j-2)

print(ans)
#### 逆元リストいらない
mod = 998244353
fact = [1]
fact_inv = [1]
for i in range(10**5+5):
    new_fact = fact[-1]*(i+1)%mod
    fact.append(new_fact)
    fact_inv.append(pow(new_fact,mod-2,mod))
def mod_comb_k(n,k,mod):
    return fact[n] * fact_inv[k] % mod * fact_inv[n-k] %mod
def power_func(a,n,p):
  bi=str(format(n,"b"))#2進表現に
  res=1
  for i in range(len(bi)):
    res=(res*res) %p
    if bi[i]=="1":
      res=(res*a) %p
  return res

N,M,K = map(int,input().split())
ans = 0
for i in range(K+1):
    X = mod_comb_k(N-1,i,mod)
    Z = power_func(M-1,N-(i+1),mod)
    #print(X,Z)
    ans += X * M * Z % mod
ans %= mod
print(ans)


### FIXED CODE ###

#### 逆元リストいらない
mod = 998244353
fact = [1]
fact_inv = [1]
for i in range(2*10**5+2):
    new_fact = fact[-1]*(i+1)%mod
    fact.append(new_fact)
    fact_inv.append(pow(new_fact,mod-2,mod))
def mod_comb_k(n,k,mod):
    return fact[n] * fact_inv[k] % mod * fact_inv[n-k] %mod
def power_func(a,n,p):
  bi=str(format(n,"b"))#2進表現に
  res=1
  for i in range(len(bi)):
    res=(res*res) %p
    if bi[i]=="1":
      res=(res*a) %p
  return res
N,M,K = map(int,input().split())
ans = 0
for i in range(K+1):
    X = mod_comb_k(N-1,i,mod)
    Z = power_func(M-1,N-(i+1),mod)
    #print(X,Z)
    ans += X * M * Z % mod
ans %= mod
print(ans)
n=int(input())
T=int(input())
minimum=10000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minimum = min(minimum,c)
if minimum = 10000:
  print('TLE')
else:
  print(minimum)
    


### FIXED CODE ###

n,T = map(int,input().split())
minimum=10000
for i in range(n):
  c,t = map(int,input().split())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)
n, a, b, c, d = list(map(int, input().split()))
s = input()
if d > c:
    for i in range(a, d-1):
        if s[i-1] == s[i] == "#":
            print("No")
            break
    else:
        print("Yes")
else:
    for i in range(a, c):
        if s[i-1] == s[i] == "#":
            print("No")
            break
    else:
        for j in range(b-1, d):
            if s[j-1] == s[j] == s[j+1] == "."):
                print("Yes")
                break
        else:
            print("No")

### FIXED CODE ###

n, a, b, c, d = list(map(int, input().split()))
s = input()
if d > c:
    for i in range(a, d-1):
        if (s[i-1] == "#") & (s[i] == "#"):
            print("No")
            break
    else:
        print("Yes")
else:
    for i in range(a, d):
        if (s[i-1] == "#") & (s[i] == "#"):
            print("No")
            break
    else:
        for j in range(b-1, d):
            if (s[j-1] == ".") & (s[j] == ".") & (s[j+1] == "."):
                print("Yes")
                break
        else:
            print("No")
import sys
from math import exp, pi

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B, H, M = map(int, read().split())

H += M / 60

t1 = 2 * pi * H / 12
t2 = 2 * pi * H

z1 = A * exp(t1 * 1j)
z2 = B * exp(t1 * 1j)

print(abs(z1 - z2))


### FIXED CODE ###

import sys
from math import cos, sin, pi

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B, H, M = map(int, read().split())

H += M / 60

t1 = 2 * pi * H / 12
t2 = 2 * pi * H

z1 = A * complex(cos(t1), sin(t1))
z2 = B * complex(cos(t2), sin(t2))

print(abs(z1 - z2))
import numpy as np
N = int(input())
x = np.empty(N,dtype=np.int)
y = np.empty(N,dtype=np.int)
h = np.empty(N,dtype=np.int)
for n in range(N):
    (x[n],y[n],h[n]) = map(int,input().split())

M = 100

grads = np.array([[1,1],[-1,1],[-1,-1],[1,-1]],dtype=np.int)
def height(x,y,h,i,j,d):
    # d=0-3
    return (h + grads[d,0]*(i-x) + grads[d,1]*(j-y))

def quadrant(x,y):
    if x > 0 and y >= 0:
        return 0
    elif y > 0:
        return 1
    elif x < 0:
        return 2
    else:
        return 3

Clist = [(Cx,Cy) for Cy in range(M+1) for Cx in range(M+1)]
k = h.argmax()
for (Cx,Cy) in Clist:
    H = height(x[k],y[k],h[k],Cx,Cy,quadrant(Cx-x[k],Cy-y[k]))
    for n in range(N):
        Hn = height(x[n],y[n],h[n],Cx,Cy,quadrant(Cx-x[n],Cy-y[n]))
        if h[n] == 0:
            if Hn < H:
                break
        else:
            if Hn != H:
                break
    else:
        break

print(i,j,H)

### FIXED CODE ###

import numpy as np
N = int(input())
x = np.empty(N,dtype=np.int)
y = np.empty(N,dtype=np.int)
h = np.empty(N,dtype=np.int)
for n in range(N):
    (x[n],y[n],h[n]) = map(int,input().split())

M = 100

grads = np.array([[1,1],[-1,1],[-1,-1],[1,-1]],dtype=np.int)
def height(x,y,h,i,j,d):
    # d=0-3
    return (h + grads[d,0]*(i-x) + grads[d,1]*(j-y))

def quadrant(x,y):
    if x > 0 and y >= 0:
        return 0
    elif y > 0:
        return 1
    elif x < 0:
        return 2
    else:
        return 3

Clist = [(Cx,Cy) for Cy in range(M+1) for Cx in range(M+1)]
k = h.argmax()
for (Cx,Cy) in Clist:
    H = height(x[k],y[k],h[k],Cx,Cy,quadrant(Cx-x[k],Cy-y[k]))
    for n in range(N):
        Hn = height(x[n],y[n],h[n],Cx,Cy,quadrant(Cx-x[n],Cy-y[n]))
        if h[n] == 0:
            if Hn < H:
                break
        else:
            if Hn != H:
                break
    else:
        break

print(Cx,Cy,H)
X = int(input())
return X>=30 

### FIXED CODE ###

X = int(input())
if X>=30:
  print('Yes')
else:
  print('No')
import numpy as np
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
Alist = [float(A) for A in Alist]
Aarray=np.array(Alist)

for m in range(M):
    i=Aarray.argmax()
    Aarray[i]=Aarray[i]/2
    if Aarray[i]==0:
        break
    # print(Alist)
Aarray_i=Aarray.atype(np.int)

print(np.sum(Aarray))

### FIXED CODE ###

from heapq import heappush,heappop
N,M=input().split(" ")
N=int(N)
M=int(M)
Alist=input().split(" ")
# Alist = [-float(A) for A in Alist]
hAqueue=[]
for A in Alist:
    heappush(hAqueue,-float(A))

for m in range(M):
    tmp=heappop(hAqueue)
    heappush(hAqueue,tmp/2)
Alist = [-int(A) for A in hAqueue]
print(sum(Alist))
from collections import deque
N, M = map(int, input().split())

graph = [[] for _ in range(N + 1)]
edge = [[] for _ in range(N + 1)]
for m in range(M):
    a, b = map(int, input().split())
    graph[a].append(b)
    graph[b].append(a)
    edge[m + 1] = [a, b]

ans = 0
for m in range(M):
    Bridge = True
    fr, to = edge[m + 1][0], edge[m + 1][1]
    V = {fr} | set(graph[fr]) - {to}
    que = deque(set(graph[fr]) - {to})
    while que:
        node = que.pop()
        for new_node in graph[node]:
            if new_node == to:
                Bridge = False
                break
            if new_node not in V:
                que.append(new_node)
                V.add(new_node)
        else:
            continue
        break
    if Bridge:
        ans += 1
print(ans)

### FIXED CODE ###

from collections import deque
N, M = map(int, input().split())

graph = [set() for _ in range(N + 1)]
edge = []
for m in range(M):
    a, b = map(int, input().split())
    graph[a].add(b)
    graph[b].add(a)
    edge.append([a, b])

ans = 0
for m in range(M):
    Bridge = True
    fr, to = edge[m][0], edge[m][1]
    V = {fr} | set(graph[fr]) - {to}
    que = set(graph[fr]) - {to}
    while que:
        node = que.pop()
        for new_node in graph[node]:
            if new_node == to:
                Bridge = False
                break
            if new_node not in V:
                que.add(new_node)
                V.add(new_node)
        else:
            continue
        break
    if Bridge:
        ans += 1
print(ans)
n,k = map(int,input().split())
print(min(n%k,k-n%k)

### FIXED CODE ###

n,k = map(int,input().split())
print(min(n%k,k-n%k))
N, Y = map(int, input().split())
c = [-1,-1,-1]
for i in range(N+1):
    for j in range(N+1):
            if 10000*i + 5000*j + 1000*(N-i-k) == Y:
                c = [i,j,N-i-k]
print(c[0],c[1],c[2])

### FIXED CODE ###

N,Y = map(int, input().split())
c = [-1,-1,-1]
for i in range(N+1):
    for j in range(N+1):
        a = N - i - j
        if a >= 0 and (10000*i + 5000*j + 1000*a) == Y:
            c = [i,j,a]
            break
print(c[0],c[1],c[2])