Harryxun/stf_run huggingface dataset:
n = input()

a = n[::-1]

prev_a = int(a[0])
prev_b = 10 - int(a[0])

# dp[下の桁から][繰り上げるかどうか]
for i in range(1, len(a)):
    x = int(a[i])
    y = x + 1
    aa = min([x + prev_a, y + prev_b])
    bb = min([(10 - x) + prev_a, (10 - y) + prev_b])
    prev_a = aa
    prev_b = bb

print(min(aa, bb))

### FIXED CODE ###

n = input()

a = n[::-1] + "0"

prev_a = int(a[0])
prev_b = 10 - int(a[0])

# dp[下の桁から][繰り上げるかどうか]
for i in range(1, len(a)):
    x = int(a[i])
    y = x + 1
    aa = min([x + prev_a, y + prev_b])
    bb = min([(10 - x) + prev_a, (10 - y) + prev_b])
    prev_a = aa
    prev_b = bb

print(min(aa, bb))
def ch_min(a, b):
    if (a > b):
        a = b
    return a


if __name__ == "__main__":
    N, K = map(int, input().split())
    h = list(map(int, input().split()))
    print(f'h = {h}')
    INF = 10 ** 10
    dp = [INF] * (10 ** 5 + 10)
    dp[0] = 0
    for i in range(N):
        for k in range(1, K + 1):
            if (i - k >= 0):
                dp[i] = ch_min(dp[i], dp[i - k] + abs(h[i] - h[i - k]))
    print(dp[N - 1])


### FIXED CODE ###

import numpy as np
N, K = map(int, input().split())
H = np.array(list(map(int, input().split())) + [0] * (K + 2), np.int32)
INF = 10 ** 9
dp = np.array([INF] * (N + K + 2), np.int32)
dp[0] = 0

for i in range(N):
    dp[i + 1:i + K + 1] = np.minimum(dp[i + 1:i + K + 1],
                                     dp[i] + np.abs(H[i + 1:i + K + 1] - H[i]))
print(dp[N - 1])
n = int(input())
p = map(int, input().split())
q = map(int, input().split())

import math

a=0
for i in range(n-1):
  a = a + (p[i]-1) * math.factorial(n-1-i)
  
b=0
for i in range(n-1):
  b = b + (p[i]-1) * math.factorial(n-1-i)
  
print( abs(a-b) )


### FIXED CODE ###

from itertools import permutations
n=int(input())
v=list(permutations(range(1,n+1),n))
print(abs(v.index(tuple(map(int,input().split())))-v.index(tuple(map(int,input().split())))))
print str(x^3)

### FIXED CODE ###

x = input()
print x**3
n=int(input())
lst=[]
for i in range(n):
  a,b,c=map(int,input().split())
  lst.append([a,b,c])
C=[[float('inf')]*3]*n
C[0][0]=lst[0][0]
C[0][1]=lst[0][1]
C[0][2]=lst[0][2]
d=[0,1,2]
for i in range(1,n-1):
  for j in d:
    e=d.remove(j)
    C[i+1][j]=C[i][e[0]]+lst[i][e[0]]
    for k in range(1,len(e)):
      if C[i][e[k]]+lst[i][e[k]]>C[i+1][j]:
        C[i+1][j]=C[i][e[k]]+lst[i][e[k]]
print(min(C[n-1]))
      
    
  
  

### FIXED CODE ###

n=int(input())
lst=[]
for i in range(n):
  a,b,c=map(int,input().split())
  lst.append([a,b,c])
C=[]
for i in range(n):
    C.append([float('inf')]*3)
C[0][0]=lst[0][0]
C[0][1]=lst[0][1]
C[0][2]=lst[0][2]
D=[0,1,2]
for i in range(n-1):
  for j in [0,1,2]:
    del D[j]
    C[i+1][j]=max(C[i][D[0]]+lst[i+1][j],C[i][D[1]]+lst[i+1][j])
    D=[0,1,2]
print(max(C[n-1]))
st=input().split()
H=int(st[0]);W=int(st[1])
c=[[0 for i in range(10)] for i in range(10)]
A=[[0 for i in range(W)]for i in range(H)]
for i in range(10):
    st=input().split()
    for j in range(10):
        c[i][j]=int(st[j])
for i in range(H):
    st=input().split()
    for j in range(W):
        A[i][j]=int(st[j])
import math
def Dijkstra(s):
    d=[math.inf]*10
    d[s]=0
    Q=set(range(10))
    V=set(range(10))
    while(len(Q)>0):
        u=list(Q)[0]
        for i in Q:
            if d[i]<d[u]:
                u=i
        Q-={u}
        for v in V-{u}:
            if (d[v]>d[u]+c[u][v]):
                d[v]=d[u]+c[u][v]
    return d[1]
result=0
DD=[0]*10
for i in range(10):
    DD[i]=Dijkstra(i)
for i in range(H):
    for j in range(W):
        if A[i][j]!=-1:
            result+=DD[A[i][j]]
print(result)


### FIXED CODE ###

N=input()
if N[0]==N[1] and N[1]==N[2]:
  print("Yes")
elif N[1]==N[2] and N[2]==N[3]:
  print("Yes")
else:
  print("No")
S = input()

if S.replace("dream"," ").replace("dreamer"," ").replace.("erase"," ").replace("eraser"," "):
  print("YES")
else:
  print("NO")


### FIXED CODE ###

S = input()

if S.replace("eraser","").replace("erase","").replace("dreamer","").replace("dream",""):
  print("NO")
else:
  print("YES")
def sum(a,N):
  if N == 1:
    return a[0]
  return a[N-1] +  sum(a,N-1)

N = int(input())
a = [int(i) for i in input().split()]
a.sort(reverse = True)
Sum_1 = 2 * sum(a,N//2) - a[0]
if N%2 == 0:
  print(Sum_1)
if N%2 == 1:
  print(Sum_1 + a[(N+1)//2])

### FIXED CODE ###

N = int(input())
a = [int(i) for i in input().split()]
a.sort(reverse = True)
if N == 3:
  print(a[0] + a[1])
ans1 = 2*sum(a[0:N//2]) - a[0]
if N%2 == 0:
  print(ans1)
if N%2 == 1 and N != 3:
  print(ans1 + a[N//2])
N = 3
S = [list(map(int, input().split())) for _ in range(N)]
n_guess = int(input())
guesses = set([int(input()) for _ in range(n_guess)])
dic = {}
for r in range(N):
  for c in range(N):
    dic[S[r][c]]=(r,c)

for g in guesses:
  if g in dic:
    (r, c) = dic[g]
    S[r][c] = -1
# print(S)
for i in range(N):
  if sum(S[i]) == -3:
    print('Yes')

    
for i in range(N):
  if sum([S[_][i] for _ in range(N)]) == -3:
    print('Yes')

    
if all([S[i][N-i-1]==-1 for i in range(N)]) or \
   all([S[i][i]==-1 for i in range(N)]):
   	print('Yes')
else:
	print('No')

### FIXED CODE ###

N = int(input())
print((N+1)//2)
import numpypy as np
n, d = list(map(int, input().split()))
a = list(map(int, input().split()))
a = np.array(a)

Max = 0

for i in range(n-d+1):
  Sum = a[i:i+d].sum()
 
  if Sum >= Max:
    Max = Sum
    ans = a[i:i+d]    
  else:
    pass
  
ans = ans*0.5 + 0.5
print(ans.sum())

### FIXED CODE ###

import numpy as np
n, d = list(map(int, input().split()))
a = list(map(int, input().split()))
Max = 0
Sum = 0
a = np.array(a)
a = a*0.5 + 0.5
ans = []

if d == 1:
  print(max(a))
elif n == d:
  print(sum(a))
else:
  for i in range(n-d+1):
    left = a[i]
    right = a[i+d-1]

    if i == 0:
      Sum = sum(a[i:i+d])
      Max = sum(a[i:i+d])
      ans = a[i:i+d]
    else:
      Sum = Sum + right - a[i-1]

      if Sum >= Max:
        Max = Sum
        ans = a[i:i+d]
      else:
        pass

  print(sum(ans))
H, W, N = map(int,input().split())
ans = [0] * 10
points = []
MAP = [[0] * W for _ in range(H)]
for _ in range(N):
    a, b = map(int,input().split())
    MAP[a-1][b-1] = 1
    points.append([a-1, b-1])
for i in range(N):
    a, b = points[i]
    for p in range(-1, 2):
        for q in range(-1, 2):
            cnt = 0
            if 1 <= a + p <= H - 2 and 1 <= b + q <= W - 2:
                for h in range(-1, 2):
                    cnt += sum(MAP[a + p + h][b + q - 1: b + q + 2])
            ans[cnt] += 1
for i in range(1,10):
    ans[i] //= i
SUM = sum(ans[1:])
ans[0] = (H-2) * (W-2) - SUM
for i in ans:
    print(i)

### FIXED CODE ###

from collections import defaultdict

H, W, N = map(int,input().split())
d = defaultdict(int)
ta = [1,1,0,-1,-1,-1,0,1,0]
tb = [0,1,1,1,0,-1,-1,-1,0]

for _ in range(N):
    a, b = map(int,input().split())
    for i in range(9):
        na = a + ta[i]
        nb = b + tb[i]
        if 1 <= na <= H and 1 <= nb <= W:
            d[(na, nb)] += 1

ans = [0] * 10

for i, v in d.items():
    if 2 <= i[0] <= H-1 and 2 <= i[1] <= W-1:
        ans[v] += 1

ans[0] = (H-2) * (W-2) - sum(ans)

for i in range(10):
    print(ans[i])
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

import numpy as np

L, R = map(int, input().split())
if (L - R) > 2019:
    k = np.arange(L, L + 2019, dtype=np.int64)
else:
    k = np.arange(L, R + 1, dtype=np.int64)

k = k % 2019
print(k[0] * k[1])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

L, R = map(int, input().split())
if (R - L) > 3000:
    print(0)
    exit()
else:
    ans = 2019
    for i in range(L, R):
        for j in range(i + 1, R + 1):
            ans = min(ans, (i * j) % 2019)
    print(ans)
a=int(input())
if a<=999:
  print("ABC")
else:
  print("ABD)

### FIXED CODE ###

a=int(input())
if a<=999:
  print("ABC")
else:
  print("ABD")
l = input().split(" ")
j = input().split(" ")
k = int(l[0])
n = int(l[1])
for i in range(n-1):
  d1 = int(j[i+1]) - int(j[i])
  d2 = int(j[i+2]) - int(j[i+1])
  max = max(d1,d2)
dt = k - int(max)
print(dt)


### FIXED CODE ###

KN = input().split(' ')
K = int(KN[0])
N = int(KN[1])
M = K/2
Al = input().split(' ')
A = []

for home in Al:
  A.append(int(home))

m = A[0]+(K-A[-1])
 
for i in range(N-1):
  m = max(m,abs(A[i]-A[i+1]))

print(K-m)
# -*- coding: utf-8

while True:
   if map(int,raw_input().split()) == [0,0]:
      break

   a = map(int,raw_input().split())
   for i in range(a[0]):
      print('#'*a[1])
      print(i)



### FIXED CODE ###

# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   for i in range(a[0]):
      print('#'*a[1])
   print('')
X, Y = map(int, input().split())
count = 0
while True:
  count++
  X = X * 2
  if X > Y:
    break
print(count)

### FIXED CODE ###

X, Y = map(int, input().split())
count = 0
while True:
  count = count + 1
  X = X * 2
  if X > Y:
    break
print(count)
n=int(input())
a=list(map(int,input().split()))
out = 0
for i in range(len(a)):
  if i > 0 :
  	for j in range(i):
  		if not (a[j] <= a[i]):
      		continue
  out += 1
print(out)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
out = 0
for i in range(len(a)):
  flg = 1
  if i > 0 :
    for j in range(i):
      if not (a[j] <= a[i]):
        flg = 0
  if flg == 1:
    out += 1
print(out)
import math

def lcm(x,y):
    return (x*y) / math.gcd(x, y)
    
x, y = map(int, input().split())
s = input()
t = input()

check = [""] * (10**6)
lc = lcm(x,y)

s_l = lc/x
t_l = lc/y

for i in range(x):
    check[i*s_l + 1] = s[i]
    
for i in range(y):
    if check[i*t_l + 1] != t[i] and check[i*t_l + 1] != "":
        print(-1)
        break
else:
    print(lc)



### FIXED CODE ###

import fractions

def lcm(x,y):
    return (x*y) // fractions.gcd(x, y)
    
x, y = map(int, input().split())
s = input()
t = input()

lc = lcm(x,y)

s_l = lc//x
t_l = lc//y

for i in range(y):
    if i%s_l == 0:
        if t[i] == s[i*t_l//s_l]:
            continue
        else:
            print(-1)
            break
else:
    print(lc)
inf = float('inf')

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

# 累積min/max
cmin = [0] * (N+1)
cmax = [0] * (N+1)
resmin = inf
resmax = -inf
for i, a in enumerate(A):
    resmin = min(resmin, a)
    resmax = max(resmax, a)
    cmin[i+1] = resmin
    cmax[i+1] = resmax

# 正負の境界を全探索 -[0,k) +[k, N)
for k in range(N+1):
    ans = []
    cnt = 0
    m = cmin[k]
    M = cmax[N] - cmax[k]

    if m < 0:
        for i, a in enumerate(A):
            res = max(-(a // m), 0)
            cnt += res
            if cnt > 2*N:
                break
            for _ in range(res):
                x = A.index(m)
                y = i
                A[y] += A[x]
                ans.append((x, y))
        
        for i in range(k-1, 0, -1):
            ans.append((i, i-1))
            A[i-1] += A[i]
            cnt += 1

    if M > 0:
        for i, a in enumerate(A):
            res = max(-(a // M), 0)
            cnt += res
            if cnt > 2*N:
                break
            for _ in range(res):
                x = A.index(M)
                y = i
                A[y] += A[x]
                ans.append((x, y))

        for i in range(k, N-1):
            ans.append((i, i+1))
            A[i+1] += A[i]
            cnt += 1
    
    flag = all(A[i] <= A[i+1] for i in range(N-1))

    if cnt < 2*N and flag:
        print(cnt)
        for x, y in ans:
            print(x, y)
        exit()

### FIXED CODE ###

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

M = max(A)
Mi = A.index(M)
m = min(A)
mi = A.index(m)

cnt = 0
ans = []

if M > 0 and m < 0:
    if abs(m) <= abs(M):
        for i in range(N):
            if Mi == i:
                continue
            x = Mi
            y = i
            A[y] += A[x]
            ans.append((x, y))
            cnt += 1
    else:
        for i in range(N):
            if mi == i:
                continue
            x = mi
            y = i
            A[y] += A[x]
            ans.append((x, y))
            cnt += 1

M = max(A)
m = min(A)

if m >= 0:
    for i in range(N-1):
        x = i
        y = i+1
        A[y] += A[x]
        ans.append((x, y))
        cnt += 1
else:
    for i in range(N-1, 0, -1):
        x = i
        y = i-1
        A[y] += A[x]
        ans.append((x, y))
        cnt += 1

print(cnt)
for x, y in ans:
    print(x+1, y+1)
A, B = input(int, input().split())

print((A + B) % 24)

### FIXED CODE ###

A, B = map(int, input().split())
 
print((A + B) % 24)
while True:
     a=list(map(int, input().split()))
     if a = zero:
          break
     a.sort()
     print(a[0],a[1])
     


### FIXED CODE ###

while True:
     a,b=map(int, input().split())
     x=[a,b]
     if a ==0 and b==0:break
     x.sort()
     print(x[0],x[1])
import math
import collections
from collections import defaultdict

N = int(input())
iwa = []
mod = 10**9+7

for i in range(N):
    a, b = map(int,input().split())
    if a == 0 and b == 0:
        continue
    elif b == 0:
        iwa,appned((1,0))
    elif a == 0:
        iwa.append((0,1))
    elif b > 0:
        c = math.gcd(a,b)
        iwa.append((a/c, b/c))#bは正
    else:
        c = math.gcd(a,b)
        iwa.append((-a/c, -b/c))#bは正
        
S = set(iwa)
I = collections.Counter(iwa)
#print(I)
jdg = defaultdict(int)

ans = 1
for i in S:
    if jdg[i] == 1:
        continue
    elif i == (1,0) or i == (0,1):
        k = I[(1,0)]
        l = I[(0,1)]
        if min(k,l) == 0:
            ans *= pow(2,max(l,k),mod)
        else:
            ans *= (pow(2,l,mod)-1) + (pow(2,k,mod)-1)+1
        jdg[(1,0)] = 1
        jdg[(0,1)] = 1
    else:
        k = I[i]
        a, b = i
        if a < 0:
            l = I[(b,-a)]
            jdg[(b, -a)] = 1
        else:
            l = I[(-b,a)]
            jdg[(-b,a)] = 1
        if min(l,k) == 0:
            ans *= pow(2,max(l,k),mod)
        else:
            ans *= (pow(2,l,mod)-1) + (pow(2,k,mod)-1)+1
        jdg[i] = 1
print(ans-1)

### FIXED CODE ###

from math import gcd
from collections import defaultdict

N = int(input())
AB = [tuple(map(int, input().split())) for _ in range(N)]
MOD = 10**9 + 7

d = defaultdict(int)#defaultdictで数えあげ
cnt_00 = 0
cnt_0b = 0
cnt_a0 = 0
for a,b in AB:
    if a == b == 0:
        cnt_00 += 1
    elif a == 0:
        cnt_a0 += 1
    elif b == 0:
        cnt_0b += 1
    else:
        num_gcd = gcd(a,b)
        grad = 1 if a * b > 0 else -1
        a //= num_gcd
        b //= num_gcd
        d[(grad, abs(a), abs(b))] += 1

ans = 1
for k in d.keys():
    if d[k] == 0:
        continue
    
    grad, a, b = k[0], k[1], k[2]
    if (-grad, b, a) in d:
        
        # 傾き a/bのものを一つ以上選ぶ場合（-b/aは選ばない） + -b/aから一つ以上選ぶ場合（a/bは選ばない） + どちらからも選ばない場合
        ans *= (pow(2, d[(grad, a, b)], MOD)-1) + (pow(2, d[(-grad, b, a)], MOD)-1) + 1
        ans %= MOD
        d[(grad, a, b)] = 0
        d[(-grad, b, a)] = 0
    else:
        # a/bから0個以上選ぶ場合
        ans *= pow(2, d[(grad, a, b)], MOD)
        ans %= MOD
        d[(grad, a, b)] = 0

# a,bの一方のみ0の場合 + どちらからも選ばない場合
ans *= (pow(2, cnt_a0, MOD)-1) + (pow(2, cnt_0b, MOD)-1) + 1
ans %= MOD

# 0,0のみを１つだけ入れる場合
ans += cnt_00
# なにも選ばない場合を除く
ans -= 1

ans %= MOD

print(ans)
s=input()
k=int(input())
ss = [0]*len(s)
for i in range(len(s)):
    if k >= 26:
        k = k + ord(s[i])-97-26
        ss[i] = "a"
    elif 97+26 - ord(s[i]) <= k:
        k = k + ord(s[i])-97-26
        ss[i] = "a"
    else:
        ss[i] = s[i]
if k != 0:
    ss[-1] = chr(ord(s[-1])+k)

for i in range(len(s)):
    print(ss[i],end='')
print()

### FIXED CODE ###

def str_rotate(S,k): # str_rotate(str,int)
    if k >= 26:
        k = k%26
    if ord(S) + k > 123:
        S = chr(ord(S)+k-97)
    else:
        S = chr(ord(S)+k)
    return S

s = list(input())
k = int(input())
for i in range(len(s)):
    if k == 0:
        break
    if s[i] == "a":
        pass
    elif 123 - ord(s[i]) <= k:
        k -= 123 - ord(s[i])
        s[i] = "a"
    else:
        pass
s[-1] = str_rotate(s[-1],k)
print("".join(s))
N, M = [int(x) for x in input().split()]
A = [int(a) for a input()]
tmp = N - sum(A)
if tmp >= 0:
    print(tmp)
else:
    print(-1)


### FIXED CODE ###

N, M = [int(x) for x in input().split()]
A = [int(a) for a in input().split()]
tmp = N - sum(A)
if tmp >= 0:
    print(tmp)
else:
    print(-1)
R = input()
G = input()
print 2*G - R

### FIXED CODE ###

R = int(input())
G = int(input())
print(2*G - R)
def dfs(x, y, matrix, visited, isWhite):
    global black, white
    dxy = [[1, 0], [-1, 0], [0, -1], [0, 1]]
    visited[y][x] = True
    w = len(matrix[0])
    h = len(matrix)

    for dx, dy in dxy:
        nx = x + dx
        ny = y + dy

        if nx < 0 or w <= nx or ny < 0 or h <= ny:
            continue

        if visited[ny][nx] is True:
            continue

        if (matrix[ny][nx] == "#" and isWhite is False) or (
            matrix[ny][nx] == "." and isWhite is True
        ):
            continue

        if matrix[ny][nx] == "#":
            black += 1
        else:
            white += 1

        isWhite = not isWhite
        dfs(nx, ny, matrix, visited, isWhite)
        isWhite = not isWhite

    return


h, w = map(int, input().split())
matrix = [""] * h
for i in range(h):
    matrix[i] = input()

ans = 0
visited = [[False] * w for _ in range(h)]

for i in range(h):
    for j in range(w):
        if matrix[i][j] == "#" and visited[i][j] is False:
            black = 1
            white = 0
            dfs(j, i, matrix, visited, False)
            ans += black * white

print(ans)


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 6)


def dfs(x, y, matrix, visited, isWhite):
    global black, white
    dxy = [[1, 0], [-1, 0], [0, -1], [0, 1]]
    visited[y][x] = True
    w = len(matrix[0])
    h = len(matrix)

    for dx, dy in dxy:
        nx = x + dx
        ny = y + dy

        if nx < 0 or w <= nx or ny < 0 or h <= ny:
            continue

        if visited[ny][nx] is True:
            continue

        if (matrix[ny][nx] == "#" and isWhite is False) or (
            matrix[ny][nx] == "." and isWhite is True
        ):
            continue

        if matrix[ny][nx] == "#":
            black += 1
        else:
            white += 1

        isWhite = not isWhite
        dfs(nx, ny, matrix, visited, isWhite)
        isWhite = not isWhite

    return


h, w = map(int, input().split())
matrix = [""] * h
for i in range(h):
    matrix[i] = input()

ans = 0
visited = [[False] * w for _ in range(h)]

for i in range(h):
    for j in range(w):
        if matrix[i][j] == "#" and visited[i][j] is False:
            black = 1
            white = 0
            dfs(j, i, matrix, visited, False)
            ans += black * white

print(ans)
#!/usr/bin/python
import sys
if sys.version_info[0]>=3: raw_input=input
 
def insertionSort(a,g):
    global cnt
    for i in range(g,len(a)):
        v = a[i]
        j = i - g
        while j >= 0 and a[j] > v:
            a[j+g] = a[j]
            j = j - g
            cnt+=1
            a[j+g] = v
 
def shellSort(a):
    global cnt
    cnt = 0
    g = []
    h = 1
    while h <= len(a):
        g.append(h)
        h = 3*h+1
    g.reverse()
    m = len(g)
    print(m)
    print(' '.join(map(str,g)))
    for i in range(m):
        insertionSort(a,g[i])
 
a=[int(raw_input()) for i in range(int(raw_input()))]
shellSort(a)
print(cnt)
for e in a: print(e)

### FIXED CODE ###

def insertion_sort(array, g, result):
    for i in range(g, len(array)):
        v = array[i]
        j = i - g
        while j >= 0 and array[j] > v:
            array[j + g] = array[j]
            j -= g
            result['count'] += 1
        A[j + g] = v


def g_gene(n):
    yield 1
    for i in range(2, n):
        x = int((3 ** i - 1) / 2)
        if x < n:
            yield x
        else:
            raise StopIteration()


def shell_sort(array, result):
    result['count'] = 0
    G = list(reversed(list(g_gene(len(array)))))
    m = len(G)
    result['G'] = G
    result['m'] = m
    for i in range(m):
        insertion_sort(array, G[i], result)


if __name__ == '__main__':
    import sys
    n = int(sys.stdin.readline())
    A = []
    for _ in range(n):
        A.append(int(sys.stdin.readline()))
    result = {}
    shell_sort(A, result)
    print(result['m'])
    print(' '.join(map(str, result['G'])))
    print(result['count'])
    for a in A:
        print(a)
x,y,z=int(input().split())
print((x-z)//y)

### FIXED CODE ###

x,y,z=map(int,input().split())
print((x-z)//(y+z))
A,B,C,K=map(int,input().split())

if K<=A:
    ans=K
elif k<=A+B:
    ans=A
else:
    ans=2*A-K

print(ans)

### FIXED CODE ###

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

if K<A:
    ans=K
elif A<=K and K<=A+B:
    ans=A
else:
    ans=2*A+B-K

print(ans)
#!/usr/bin/env python3

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

a = [int(input()) for _ in range(m)]

mod = 1000000007


if a[0] == 1:
    a_2, a_1 = 1, 0
    index = 1
else:
    a_2, a_1 = 1, 1
    index = 0

for i in range(2, n+1):
    if index < len(a):
        if i == a[index]:
            a_now = 0
            index += 1
            a_1, a_2 = a_now, a_1
            continue

    a_now = (a_1+a_2) % mod
    # print(a_now)
    a_1, a_2 = a_now, a_1
    # print(a_now)
print(a_now % mod)

# 0, 1, 2, 3, 4, 5, 6

# 1, 1, 2, 0, 2, 2, 4


### FIXED CODE ###

#!/usr/bin/env python3

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

if m != 0:
    a = [int(input()) for _ in range(m)]
else:
    a = [-1]

mod = 1000000007

if n == 1:
    print(1)
    exit()
elif n == 2:
    if a[0] == 1:
        print(1)
    else:
        print(2)
    exit()


if a[0] == 1:
    a_2, a_1 = 1, 0
    index = 1
else:
    a_2, a_1 = 1, 1
    index = 0

for i in range(2, n+1):
    if index < len(a):
        if i == a[index]:
            a_now = 0
            index += 1
            a_1, a_2 = a_now, a_1
            continue

    a_now = (a_1+a_2) % mod
    # print(a_now)
    a_1, a_2 = a_now, a_1
    # print(a_now)
print(a_now % mod)

# 0, 1, 2, 3, 4, 5, 6

# 1, 1, 2, 0, 2, 2, 4
D, G = map(int, input().split())
pc = [[i + 1] + [int(x) for x in input().split()] for i in range(D)]

import math
m = {}
def f(cur, n, pc, left):
    if left <= 0:
        return n
    def g(cur, n, pc, left):
        fp = (cur, left)
        if fp in m: return m[fp]
        m[fp] = f(cur, n, pc, left)
        return m[fp]
    ret = 10**9
    for x in pc:
        i, p, c = x
        if i*100*p > left:
            h = math.ceil(left / (i*100))
            ret = min(ret, n + h)
        else:
            nc = cur.copy()
            nc.add(i)
            npc = pc.copy()
            npc.remove(x)
            h = f(nc, n + p, npc, max(0, left - i*100*p - c))
            ret = min(ret, h)
    return ret

print(f(set(), 0, pc, G))

### FIXED CODE ###

D, G = map(int, input().split())
pc = [[i + 1] + [int(x) for x in input().split()] for i in range(D)]

import math
m = {}
def f(cur, n, left):
    if left <= 0:
        return n
    def g(cur, n, left):
        if cur in m: return m[cur]
        r = m[cur] = f(cur, n, left)
        return r
    ret = 10**9
    for x in pc:
        i, p, c = x
        if (1 << i) & cur: continue
        ip = i*100*p
        if ip > left:
            h = math.ceil(left / (i*100))
            ret = min(ret, n + h)
        else:
            if n + p >= ret: continue
            h = g(cur | (1 << i), n + p, left - ip - c)
            ret = min(ret, h)
    return ret

print(f(0, 0, G))
N,M=map(int,input().split())
V=[]
for _ in range(M):
    a,b=map(int,input().split())
    f=True
    for t in V:
        if a in t and b not in t:
            f=False
            t.append(a)
            break
        if a in t and b not in t:
            f=False
            t.append(b)
            break
    if f:
        V.append((a,b))
if M == 0:
    print(1)
else:
    print(max(map(len,V)))


### FIXED CODE ###

D,T,S=map(int,input().split())
print('Yes' if S*T>=D else 'No')