Harryxun/stf_run huggingface dataset:
N, X, Y = map(int, input().split())
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix
inf = float("inf")

graph = np.zeros((N, N))
for i in range(N - 1):
    graph[i][i + 1] = 1
    graph[i + 1][i] = 1
graph[X - 1][Y - 1] = 1
graph[Y - 1][X - 1] = 1

shortest_paths = shortest_path(csr_matrix(graph), directed=False, method="D", unweighted=True)
ans = [0] * (N - 1)
for i in range(N):
    for j in range(N):
        if i != j:
            ans[shortest_paths[i][j]] += 1


### FIXED CODE ###

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

# G[v]: 頂点vに隣接する頂点list
# N: 頂点数
G = [[] for i in range(N)]
G[X - 1].append(Y - 1)
for i in range(N - 1):
    G[i].append(i + 1)
    G[i + 1].append(i)
# print(G)


def bfs(start):
    dist = [-1] * N
    que = deque([start])
    dist[start] = 0
    while que:
        v = que.popleft()
        d = dist[v]
        for w in G[v]:
            if dist[w] > -1:
                continue
            dist[w] = d + 1
            que.append(w)
    return dist


ans = [0] * N

for i in range(N - 1):
    # print(bfs(i))
    for ele in bfs(i)[i + 1:]:
        ans[ele] += 1
for a in ans[1:]:
    print(a)
N=input()
A=input()
B=input()
a=str(A+B)
b=str(N/a)
c=str(N%a)
if c<A:
  print(str(b*A+c))
else:
  print(str(b*A+A))


### FIXED CODE ###

N,A,B=(int(x) for x in input().split())
a=int(A+B)
b=int(N/a)
c=int(N%a)
if c<A:
  print(int(b*A+c))
else:
  print(int(b*A+A))
import numpy as np
N, K = [int(i) for i in input().split()]
H = np.array([int(i) for i in input().split()])

dp = np.zeros(N)
for i in range(1, N):
    L = []
    for j in range(max(0, i-K), i):
        L.append(dp[j] + abs(H[i] - H[j]))
    dp[i] = min(L)

print(int(dp[-1]))

### FIXED CODE ###

def func():
    N, K = [int(i) for i in input().split()]
    H = [int(i) for i in input().split()]
    
    dp = [0]*N
    for i in range(1, N):
        L = []
        for j in range(max(0, i-K), i):
            L.append(dp[j] + abs(H[i] - H[j]))
        dp[i] = min(L)

    print(dp[-1])
    
if __name__=="__main__":
    func()
a,b = input().split()
print(a * b)

### FIXED CODE ###

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

print(a*b)
a = input()
b = input()
print((a-1)*(b-1))

### FIXED CODE ###

a, b = (int(i) for i in input().split()) 
print((a-1)*(b-1))
n = int(input())
stp = int(N/1.08)
while True:
  cost = int(stp*1.08)
  if cost == n:
    ans = cost
    break
  elif cost > n:
    ans = '):'
    break
  else:
    stp += 1
print(ans)

### FIXED CODE ###

n = int(input())
stp = int(n/1.08)
while True:
  cost = int(stp*1.08)
  if cost == n:
    ans = stp
    break
  elif cost > n:
    ans = ':('
    break
  else:
    stp += 1
print(ans)
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

if len(x) == 0:
  print("TLE")

### FIXED CODE ###

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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

if len(x) != 0:
  print(x[0])
else:
  print("TLE")
N=int(input())
1<=N<=1988

if N<=999:
    print('ABC')
else N>=1000:
    print('ABD')

### FIXED CODE ###

N=int(input())
if N>=1000:
    print('ABD')
else:
    print('ABC')
a,b=str(input()).split()
print(lower(a+b))

### FIXED CODE ###

a,b=input().split()
print(b+a)
n, m, k = map(int, input().split())
MOD = 998244353

def modpow(a, n, p):
  if n == 1:
    return a % p 
  elif n % 2 == 1:
    return a * modpow(a, n-1, p) % p
  else:
    return modpow(a, n//2, p) **2 % p
dp = [0]*(k+1)
dp[0] = m* modpow(m-1, n-1, MOD) % MOD
for j in range(1, k+1):
  bunsi = 1
  for i in range(n-1-j+1, n):
    bunsi = bunsi * i % MOD

  bunbo = 1
  for i in range(1, j+1):
    bunbo = bunbo * i % MOD

  comb = bunsi * modpow(bunbo, MOD-2, MOD) % MOD
  dp[j] = (m * modpow(m-1, n-1-j, MOD)*comb % MOD + dp[j-1]) % MOD
print(dp[k])

### FIXED CODE ###

n, m, k = map(int, input().split())
MOD = 998244353

def modpow(a, n, p):
  if n == 0:
    return 1
  if n == 1:
    return a % p 
  elif n % 2 == 1:
    return a * modpow(a, n-1, p) % p
  else:
    return modpow(a, n//2, p) **2 % p
dp = [0]*(k+1)
dp[0] = m* modpow(m-1, n-1, MOD) % MOD
bunsi = 1
bunbo = 1
for j in range(1, k+1):
  bunsi = bunsi * (n-j) % MOD
  bunbo = bunbo * j % MOD

  comb = bunsi * modpow(bunbo, MOD-2, MOD) % MOD
  dp[j] = (m * modpow(m-1, n-1-j, MOD)*comb % MOD + dp[j-1]) % MOD
print(dp[k])
import sys
if __name__ == "__main__":
    N = int(input())
    evidences = list(map(int, input().split()))
    evidences = list(sorted(evidences))
    unique_evidence = set(evidences)
    if (evidences[-1] - evidences[0] > 1):
        print ("No")
        sys.exit()
    if (len(unique_evidence) == 1):
        group = evidences[0];
        # all unique
        if (group == N - 1):
            print ("Yes")
            sys.exit()
        if (N - 2 * group < 0):
            print ("No")
            sys.exit()
        print ("Yes")
        sys.exit()
    # evidences[-1] - evidences[0] > 1
    min_val = min(evidences)
    max_val = max(evidences)

    min_val_cnt = 0
    max_val_cnt = 0
    for val in evidences:
        if (val == min_val):
            min_val_cnt += 1
        else:
            max_val_cnt += 1
    # violate not unique
    if (max_val_cnt <= 1):
        print ("No")
        sys.exit()
    #rest cat
    rest = N
    rest -= min_val_cnt

    min_group = min_val_cnt + 1
    max_group = min_val_cnt + (max_val_cnt // 2)
    if min_group <= evidences[-1] and evidences <= max_group:
        print ("Yes")
        sys.exit()
    print ("No")


### FIXED CODE ###

import sys
if __name__ == "__main__":
    N = int(input())
    evidences = list(map(int, input().split()))
    evidences = list(sorted(evidences))
    unique_evidence = set(evidences)
    if (evidences[-1] - evidences[0] > 1):
        print ("No")
        sys.exit()
    if (len(unique_evidence) == 1):
        group = evidences[0];
        # all unique
        if (group == N - 1):
            print ("Yes")
            sys.exit()
        if (N - 2 * group < 0):
            print ("No")
            sys.exit()
        print ("Yes")
        sys.exit()
    # evidences[-1] - evidences[0] > 1
    min_val = min(evidences)
    max_val = max(evidences)

    min_val_cnt = 0
    max_val_cnt = 0
    for val in evidences:
        if (val == min_val):
            min_val_cnt += 1
        else:
            max_val_cnt += 1
    # violate not unique
    if (max_val_cnt <= 1):
        print ("No")
        sys.exit()
    #rest cat
    rest = N
    rest -= min_val_cnt

    min_group = min_val_cnt + 1
    max_group = min_val_cnt + (max_val_cnt // 2)
    if min_group <= evidences[-1] and evidences[-1] <= max_group:
        print ("Yes")
        sys.exit()
    print ("No")
import math
n = int(input())
root = math.ceil(math.sqrt(n))
nums = []
for i in range(1,root+1):
  for j in range(1,root + 1):
    if i*j == n:
      count_i = len(str(i))
      count_j = len(str(j))
      ans = max(count_i,count_j)  
      nums.append(ans)
nummm = sorted(nums,reverse = True)
print(nummm[0])

### FIXED CODE ###

import math
n = int(input())
root_n = math.ceil(math.sqrt(n))
f = []
for i in range(1,root_n+1):
  if n % i == 0:
    f_pair = max(len(str(int(i))),len(str(int(n/i))))
    f.append(f_pair)
mini = min(f)
print(mini)
n = int(input())
as = list(map(int, input().split()))

for i in range(n):
    as[i] = 1 / as[i]
ans = 1 / sum(as)

### FIXED CODE ###

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

for i in range(n):
    AS[i] = 1 / AS[i]
ans = 1 / sum(AS)
print(ans)
n = int(input())

def f(x):
    a1 = int(str(x)[0])
    a2 = x%10
    return (a1, a2)

count = {}
for x in range(1, n+1):
    key = f(x)
    if key in count:
        count[key] += 1
    else:
        count[key] = 1

ans = 0
for x in range(1, n+1):
    a0, a1 = f(x)
    if a1 != 0:        # !
        key = (a1, a0) # swap
        ans += count[key]

print(ans)

### FIXED CODE ###

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

def f(x):
    a1 = int(str(x)[0])
    a2 = x%10
    return (a1, a2)

count = defaultdict(int)
for x in range(1, n+1):
    key = f(x)
    count[key] += 1

ans = 0
for x in range(1, n+1):
    a0, a1 = f(x)
    if a1 != 0:        # !
        key = (a1, a0) # swap
        ans += count[key]

print(ans)
n,m=map(int,input().split())
lst=[]
for i in range(m):
  p,y=map(int,input().split())
  lst.append([i,p,y])
lst.sort(key=lambda x:(x[1],x[2]))
j=1
Lst=[]
for i in range(m):
  if lst[i][1]==lst[min(m-1,i+1)][1]:
    s=str(lst[i][1])
    t=str(j)
    u=s.zfill(6)+t.zfill(6)
    j+=1
    Lst.append([lst[i][0],u])
  else:
    s=str(lst[i][1])
    t=str(j)
    u=s.zfill(6)+t.zfill(6)
    j-=j-1
    Lst.append([lst[i][0],u])
Lst.sort(lambda x:x[0])
for k in range(m):
  print(Lst[k][1])
  


### FIXED CODE ###

n,m=map(int,input().split())
lst=[]
for i in range(m):
  p,y=map(int,input().split())
  lst.append([i,p,y])
lst.sort(key=lambda x:(x[1],x[2]))
j=1
Lst=[]
for i in range(m):
  if lst[i][1]==lst[min(m-1,i+1)][1]:
    s=str(lst[i][1])
    t=str(j)
    u=s.zfill(6)+t.zfill(6)
    j+=1
    Lst.append([lst[i][0],u])
  else:
    s=str(lst[i][1])
    t=str(j)
    u=s.zfill(6)+t.zfill(6)
    j-=j-1
    Lst.append([lst[i][0],u])
Lst.sort(key=lambda x:x[0])
for k in range(m):
  print(Lst[k][1])
N = int(input())
A = sorted(list(map(int, input().split())))

while len(A) >= 2: #残りの数が1になったら終わり
  if A[0] == 1: break
  #余りが出る場合は、左側の数字と余りを入れ替える
  rem = A[1] % A[0] #余り
  if rem != 0: A[0], A[1] = rem, A[0]
  #余りが0の場合、そいつは下位互換なので要らない？
  else: del A[1]
  print(A)

print('出たよ'+str(A[0]))

### FIXED CODE ###

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

while len(A) >= 2: #残りの数が1になったら終わり
  if A[0] == 1: break
  #余りが出る場合は、左側の数字と余りを入れ替える
  rem = A[1] % A[0] #余り
  if rem != 0: A[0], A[1] = rem, A[0]
  #余りが0の場合、そいつは下位互換なので要らない？
  else: del A[1]

print(A[0])
a = '1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51'
k = int(input())
b = a.split(", ")
print(b[k])

### FIXED CODE ###

a = '1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51'
k = int(input())
b = a.split(", ")
print(b[k-1])
import numpy as np
k,n=map(int,input().split())
a=list(map(int,input().split()))
a=np.array(a)
a1=abs(a[1:]-a[:-1])
a1.append(abs(a[0]-a[-1]))
print(k-max(a1))


### FIXED CODE ###

import numpy as np
k,n=map(int,input().split())
a=list(map(int,input().split()))
a=np.array(a)
if max(abs(a[1:]-a[:-1])) < k-abs(a[0]-a[-1]):b=k-abs(a[0]-a[-1])
else:b= max(abs(a[1:]-a[:-1]))
print(k-b)
a,b = map(int, input().split())

cnt = 0

if a > b:
	cnt += a
    a -= 1
else:
	cnt += b
    b -= 1

if a > b:
	cnt += a
    a -= 1
else:
	cnt += b
    b -= 1
print(cnt)

### FIXED CODE ###

import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = sys.stdin.readline

def eprint(s):
    if type(s) != type('str'):
        s=str(s)

    sys.stderr.write(s+'\n')
    return

def main():
    a,b = map(int, input().split())

    cnt = 0
    if a > b:
        cnt += a
        a -= 1
    else:
        cnt += b
        b -= 1
    if a > b:
        cnt += a
        a -= 1
    else:
        cnt += b
        b -= 1
    print(cnt)
    return

if __name__ == '__main__':
    main()
import sys
input = sys.stdin.readline

N,M = (int(x) for x in input().split())
a = set(int(input()) for _ in range(M))
dp = [0] * N
broke = False
if 1 in a and 2 not in a:
    dp[1] = 1
elif 1 not in a and 2 in a:
    dp[0] = 1
else:
    dp[0] = 1
    dp[1] = 2
if 1 in a and 2 in a:
    print('0')
    broke = True
else:
    for i in range(3,N+1):
        if i-1 in a and i-2 in a:
            print('0')
            broke = True
            break
        elif i-1 in a:
            dp[i-1] = dp[i-3]
        elif i-2 in a:
            dp[i-1] = dp[i-2]
        else:
            dp[i-1] = (dp[i-2] + dp[i-3]) % 1000000007
if broke == False:
    print(dp[N-1])

### FIXED CODE ###

N,M = (int(x) for x in input().split())
a = set(int(input()) for _ in range(M))
dp = [0] * N
broke = False
if N == 1:
    print('1')
    broke = True
elif 1 in a and 2 not in a:
    dp[1] = 1
elif 1 not in a and 2 in a:
    dp[0] = 1
else:
    dp[0] = 1
    dp[1] = 2
if 1 in a and 2 in a:
    print('0')
    broke = True
else:
    for i in range(3,N+1):
        if i-1 in a and i-2 in a:
            print('0')
            broke = True
            break
        elif i-1 in a:
            dp[i-1] = dp[i-3]
        elif i-2 in a:
            dp[i-1] = dp[i-2]
        else:
            dp[i-1] = (dp[i-2] + dp[i-3]) % 1000000007
if broke == False:
    print(dp[N-1])
l = []

for i in range(10):
    l.append(int(input()))

l.sort()

for i in range(3):
    print(l[-1 * [i]])

### FIXED CODE ###

mountains = []
for x in range(10):
    mountains.append(int(raw_input()))
mountains.sort()
print(mountains[-1])
print(mountains[-2])
print(mountains[-3])
X = int(input())
sen = X // 500
amari = X % 500
go = amari // 5
ans = sen * 1000 + gp * 5

### FIXED CODE ###

X = int(input())
sen = X // 500
amari = X % 500
go = amari // 5
ans = sen * 1000 + go * 5
print(ans)
X, Y = map(int, input().split())

if Y < X*2 :
  print("NO")
  eit()
  
if Y % 2 == 0:
  print("YES")
else:
  print("NO")
  
  

### FIXED CODE ###

X, Y = map(int, input().split())

if Y < X*2 :
  print("No")
  exit()

elif Y > X*4:
  print("No")
  exit()
    
if Y % 2 == 0:
  print("Yes")
else:
  print("No")
N = int(input())
X = list(map(int, input().split()))
tmp = 0
ans = []

for i in range(X[0],1+X[N-1]):
  for j in range(N):
    tmp = tmp + (X[j]-i)**2
  ans.append(tmp)
  tmp = 0
print(min(ans))

### FIXED CODE ###

N = int(input())
X = list(map(int, input().split()))
ans = []
tmp = 0

for i in range(min(X), 1+max(X)):
  for j in range(N):
    tmp += (X[j]-i)**2 
  ans.append(tmp)
  tmp = 0  
print(min(ans))
N,u,v=map(int,input().split())

du,dv=[0]*-~N,[0]*-~N
T=[list() for i in range(-~N)]

def dfs(p,t,v,d):
  d[v]=t
  for i in T[v]:
    if i!=p:
      dfs(v,t+1,i,d)

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

dfs(0,0,u,du)
dfs(0,0,v,dv)

c=0
for i in range(1,-~N):
  if len(T[i])==1 and i!=v:
    if du[i]<dv[i]:
      c=max(c,~-dv[i])

print(c)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
N,u,v=map(int,input().split())

du,dv=[0]*-~N,[0]*-~N
T=[list() for i in range(-~N)]

def dfs(p,t,v,d):
  d[v]=t
  for i in T[v]:
    if i!=p:
      dfs(v,t+1,i,d)

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

dfs(0,0,u,du)
dfs(0,0,v,dv)

c=0
for i in range(1,-~N):
  if len(T[i])==1 and i!=v:
    if du[i]<dv[i]:
      c=max(c,~-dv[i])

print(c)
import re
N, Q = (int(i) for i in input().split(' ')) 
S = input()
for i in range(Q):
    l_i, r_i = (int(j) for j in input().split())
    matches = re.findall('AC', S[l_i-1:r_i])
    print(len(matches))

### FIXED CODE ###

ACGT = {'A':'T', 'C':'G', 'T':'A', 'G':'C'}
input_ACGT = input()
print(ACGT[input_ACGT])
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <stdio.h>
#include <iomanip>
#include <limits>
#include <list>
#include <string>
#include <queue>
#include <deque>
#include <tuple>
#include <map>
#include <sstream>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<(int)(b); i++)
#define ALL(x) (x).begin(),(x).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define SORT(c) sort(ALL(x))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define PB push_back
#define MP make_pair
#define SP << " " <<
const int INF = 1001001001;
const ll LINF = 100100100100100100;
const double EPS = 1e-10;
const long double PI  = acos(-1.0L);
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
#define chmax(a,b) a = (((a)<(b))?(b):(a))
#define chmin(a,b) a = (((a)>(b))?(b):(a))

__attribute__((constructor))
void initial(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(15);
}

signed main(){
	ll a,b,c; cin>>a>>b>>c;
	cerr << 4*a*b SP pow(c-a-b,2) << endl;
	if(c-a-b<=0) cout<<"No";
	else if(4*a*b<pow(c-a-b,2)) cout << "Yes";
	else cout << "No";

  return 0;
}


### FIXED CODE ###

h = list(map(int, input().split()));
a = h[0]
b = h[1]
c = h[2]
if(c-a-b<=0):
  print("No")
elif(4*a*b<(c-a-b)**2):
  print("Yes")
else:
  print("No")
n = int(input())
v = [int(i) for i in input().split()]
odd = [v[i] for i in range(n) if i % 2 == 1]
even = [v[i] for i in range(n) if i % 2 == 0]
summ_odd = {i: odd.count(i) for i in set(odd)}
summ_even = {i: even.count(i) for i in set(even)}
odd_max_k = max(summ_odd.items(), key=lambda x: x[1])[0]
even_max_k = max(summ_even.items(), key=lambda x: x[1])[0]
if odd_max_k == even_max_k:
    if len(summ_odd) == 1:
        if len(summ_even) == 1:
            print(n//2)
            exit()
        else:
            tmp = summ_even.pop(even_max_k)
            even_max_k = max(summ_even.items(), key=lambda x: x[1])[0]
            summ_even.upddate(tmp)
    else:
        tmp = summ_odd.pop(odd_max_k)
        odd_max_k = max(summ_odd.items(), key=lambda x: x[1])[0]
        summ_odd.upddate(tmp)

summ_odd.pop(odd_max_k)
summ_even.pop(even_max_k)
res = sum(summ_odd.values()) + sum(summ_even.values())
print(res)

### FIXED CODE ###

n = int(input())
v = [int(i) for i in input().split()]
even = [0] * int(1e5+1)
odd = [0] * int(1e5+1)

for i, k in enumerate(v):
    if (i & 1 == 0):
        even[k] += 1
    else:
        odd[k] += 1

if even.index(max(even)) == odd.index(max(odd)):
    even.sort(reverse=True)
    odd.sort(reverse=True)
    print(min(n - even[1] - odd[0],
              n - even[0] - odd[1]))
else:
    even.sort(reverse=True)
    odd.sort(reverse=True)
    print(n - even[0] - odd[0])
N = int(input())
A = list(map(int,input().split()))
for i in range(N):
    A[i] = A[i] % 4
if A.count(2) % 2 == 0:
    if A.count(4) >= (A.count(1)+A.count(3)):
        print("Yes")
    else:
        print("No")
else:
    if A.count(4) >= (A.count(1)+A.count(3)) + 1:
    print("Yes")                         
else:                                    
    print("No")                          

### FIXED CODE ###

N = int(input())
d4 = 0
d2 = 0
for i in list(map(int,input().split())):
    if i % 4 == 0:
        d4 += 1
    elif i % 2 == 0:
        d2 += 1
    else:
        None
if N <= d4*2 + 1:
    print("Yes")
elif N - d4 * 2 <= d2 :
    print("Yes")
else:
    print("No")
N, Q = map(int, input().split())
A = [[] for _ in range(N)]
for _ in range(N-1):
    i, k = map(int, input().split())
    A[i-1].append(k-1)
n_P = [0] * N
for _ in range(Q):
    k, n = map(int, input().split())
    n_P[k-1] += n
ans = [0] * N
visited = [0] * N
def make(num, A, p):
    for i in A[num]:
        visited[i] = 1
        n_P[i] += p
        make(i, A, n_P[i])
    return
for i in range(N):
    if visited[i] == 0:
        make(i, A, n_P[i])
print(*n_P)

### FIXED CODE ###

import sys
sys.setrecursionlimit(2*10**9)
N, Q = map(int, input().split())
A = [[] for _ in range(N)]
for _ in range(N-1):
    i, k = map(int, input().split())
    A[i-1].append(k-1)
    A[k-1].append(i-1)
n_P = [0] * N
for _ in range(Q):
    k, n = map(int, input().split())
    n_P[k-1] += n
ans = [0] * N
visited = [0] * N
def make(num, p):
    ans[num] += n_P[num] 
    ans[num] += p
    visited[num] = 1
    for i in A[num]:
        if visited[i] == 0:
            make(i,ans[num])
    return
make(0, ans[0])
print(*ans)
print s[:4] + ' ' + s[4:]

### FIXED CODE ###

# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]
import sys 

day = sys.argv[1]
if day == '22'

 print('Christmas Eve Eve Eve')
elif day == '23'
 print('Christmas Eve Eve')
elif day == '24'
 print('Christmas Eve')
elif day == '25'
 print('Christmas')


### FIXED CODE ###


day = input()
if day == '22':
 print('Christmas Eve Eve Eve')
elif day == '23':
 print('Christmas Eve Eve')
elif day == '24':
 print('Christmas Eve')
elif day == '25':
 print('Christmas')
import fractions
N,M=map(int,input().split())
S=input()
T=input()
lcm=(N*M)/fractions.gcd(N,M)
num=0
s=[]
t=[]
flag=1
sindex=0
tindex=0
num=lcm
st=[""]*int(num)
for j in range(N):
    s.append([S[j],int(1+(num//N)*j)-1])
for j in range(M):
    t.append([T[j], int(1 + (num // M) * j) - 1])
#print(s,t)
while (sindex<N)and(tindex<M):
    #print(sindex,tindex)
    if s[sindex][1]==t[tindex][1]:
        if s[sindex][0]!=t[tindex][0]:
            flag=0
            break
        sindex=sindex+1
        tindex=tindex+1
    elif s[sindex][1]<t[tindex][1]:
        sindex=sindex+1
    else:
        tindex = tindex + 1
    #input()
if flag==0:
    print("-1")
else:
    print(len(st))




### FIXED CODE ###

import fractions
N,M=map(int,input().split())
S=input()
T=input()
lcm=(N*M)/fractions.gcd(N,M)
num=0
s=[]
t=[]
flag=1
sindex=0
tindex=0
while (sindex<N)and(tindex<M):
    if S[sindex]!=T[tindex]:
        flag=0
        break
    sindex=sindex+(N//fractions.gcd(N,M))
    tindex = tindex + (M // fractions.gcd(N, M))
"""
for j in range(N):
    s.append([S[j],int(1+(num//N)*j)-1])
for j in range(M):
    t.append([T[j], int(1 + (num // M) * j) - 1])
#print(s,t)
while (sindex<N)and(tindex<M):
    #print(sindex,tindex)
    if s[sindex][1]==t[tindex][1]:
        if s[sindex][0]!=t[tindex][0]:
            flag=0
            break
        sindex=sindex+1
        tindex=tindex+1
    elif s[sindex][1]<t[tindex][1]:
        sindex=sindex+1
    else:
        tindex = tindex + 1
    #input()
"""
if flag==0:
    print("-1")
else:
    print(int(lcm))
a,b,c=map(int,input().split())
if a+b+c=>22:
  print("bust")
else:
  print("win")

### FIXED CODE ###

a,b,c=map(int,input().split())
if a+b+c>=22:
  print("bust")
else:
  print("win")
N = int(input())
K = int(input())
x = list(map(int,input().split()))

cnt = 0
for i in x:
    cnt += 2 * min(i,K - i)

print(cnt)


### FIXED CODE ###

N = int(input())
A = int(input())

print(N ** 2 - A)
a,b,c = map(int,input().split())
if(c-b>a): print("dangerous")
else if(c-b<=0): print("delicious")
else : print("safe")


### FIXED CODE ###

a,b,c = map(int,input().split())
if(c-b>a): 
  print("dangerous")
elif(c-b<=0): 
  print("delicious")
else:
  print("safe")
import math

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

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

print(lcm(a, b))


### FIXED CODE ###

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

def gcd(x, y):
	while y!=0:
		x, y = y , x%y
	return x

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

print(lcm(a, b))
l1 = list(map(int, input().split()))
l2 = list(map(int, input().split()))

def attack2(l1, l2):
    H = l1[0]
    N = l1[1]
    A = sum(l2)
    result = H - A
    if result >0:
        return "No"
    else:
        return "Yes"
      
print(attack2(l1, l2))

### FIXED CODE ###

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

def attack(l):
    H = l[0]
    A = l[1]
    cnt = 0
    while H > 0:
        H -= A
        cnt += 1
    return cnt

print(attack(l))