Harryxun/stf_run huggingface dataset:
a = input()
if 7 in a: 
  print("Yes")
else: 
  print("No")

### FIXED CODE ###

a = input()
if "7" in a: 
   print("Yes")
else: 
   print("No")
import numpy as np
N = int(input())
X = np.array([int(i) for i in input().split()])

ans = []
for i in range(1, max(X)):
    ans.append(sum((X - i)**2))
    
print(min(ans))

### FIXED CODE ###

import numpy as np
N = int(input())
X = np.array([int(i) for i in input().split()])

ans = []
for i in range(0, max(X)+1):
    ans.append(sum((X - i)**2))
    
print(min(ans))
s=input()
print("Heisei" if int(s[5:7])<5) else "TBD")

### FIXED CODE ###

s=input()
y=int(s[:4])
print("Heisei" if y<2019 or (y==2019 and int(s[5:7])<5) else "TBD")
N = int(input())
mnstr = list(map(int, input().split()))
yusha = list(map(int, input().split()))
sum = 0
killed = 0

for i in range(N):
  killedtemp1 = min(mnstr[i], yusha[i])#iの勇者が倒したモンスターiの数
  yusha[i] = max(0, yusha[i]-mnstr[i])
  killedtemp2 = min(mnstr[i+1], yusha[i])#iの勇者が倒したモンスターi+1の数
  mnstr[i+1] = mnstr[i+1] - killedtemp2
  killed += killedtemp1 + killedtemp2
  
print(killed)
  

### FIXED CODE ###

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

sum = a + b
if sum % 2 == 1:
  print("IMPOSSIBLE")
else:
  print(sum // 2)
def bfs(count, x, y, cheese):
    queue = [(count,x,y)]
    while len(queue)>0:
        tempc,tempx,tempy = queue.pop(0)
        if geo[tempx][tempy] == cheese:
            return tempc,tempx,tempy
        for i in range(4):
            neox = tempx+dx[i]
            neoy = tempy+dy[i]
            if canGoTo(neox,neoy):
                queue.append((tempc+1,neox,neoy))

    return (-1,-1,-1)

def canGoTo(x,y):
    if 0<=x<H and 0<=y<W:
        return not visited[x][y]
    return False

dx = [0,1,0,-1]
dy = [-1,0,1,0]

data = input().split(' ')
H,W,N = map(int, data)

#maps
geo = [[None for i in range(W)] for j in range(H)]
visited = [[False for i in range(W)] for j in range(H)]

x,y=-1,-1
for i in range(H):
    line = input()
    for j in range(W):
        p = line[j:j+1]
        geo[i][j] = p
        if p == 'X':
            visited[i][j] = True
        elif p == 'S':
            x,y, = i,j
            
count = 0
for n in range(1,N+1):
    count,x,y = bfs(count,x,y,str(n))
print(count)

### FIXED CODE ###

import copy
from collections import deque
def bfs(count, x, y, cheese):
    q = deque()
    q.append((count,x,y))
    tempVisited = copy.deepcopy(visited)
    tempVisited[x][y] = True
    
    while len(q)>0:
        tempc,tempx,tempy = q.popleft()
        if geo[tempx][tempy] == cheese:
            return tempc,tempx,tempy
        for i in range(4):
            neox = tempx+dx[i]
            neoy = tempy+dy[i]
            if canGoTo(neox,neoy, tempVisited):
                if (tempc+1,neox,neoy) not in q:
                    q.append((tempc+1,neox,neoy))
                    tempVisited[neox][neoy]=True
    return (-1,-1,-1)

def canGoTo(x,y,tempVisited):
    if 0<=x<H and 0<=y<W:
        return not tempVisited[x][y]
    return False

dx = [0,1,0,-1]
dy = [-1,0,1,0]

data = input().split(' ')
H,W,N = map(int, data)

#maps
geo = [[None for i in range(W)] for j in range(H)]
visited = [[False for i in range(W)] for j in range(H)]

x,y=-1,-1
for i in range(H):
    line = input()
    for j in range(W):
        p = line[j:j+1]
        geo[i][j] = p
        if p == 'X':
            visited[i][j] = True
        elif p == 'S':
            x,y, = i,j
            
count = 0
for n in range(1,N+1):
    count,x,y = bfs(count,x,y,str(n))
print(count)
import sys
#import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
#import math
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
import numpy as np

h, w, k = rl()
a=[list(rs()) for _ in range(h)]
ans=0
for i in range(1<<h+w):
    c = np.array(a[:])
    for n in range(h+w):
        if i>>n&1:
            if n>=h:
                c[:,n-h-1]="*"
            else:
                c[n-1,:]="*"
    cnt=0
    for y in range(h):
        for x in range(w):
            if c[y][x]=="#":
                cnt+=1
    if cnt==k:
        ans+=1
print(ans)

### FIXED CODE ###

import sys
#import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
#import math
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
import numpy as np

h, w, k = rl()
a=[list(rs()) for _ in range(h)]
ans=0
for i in range(1<<h+w):
    c = np.array(a[:])
    for n in range(h+w):
        if i>>n&1:
            if n>=h:
                c[:,n-h-1]="*"
            else:
                c[n-1,:]="*"
    cnt=0
    for y in range(h):
        for x in range(w):
            if c[y][x]=="#":
                cnt+=1
    if cnt==k:
        ans+=1
print(ans)
N = int(input())
a = []
for i in range(N):
    a.append(input()) 
R=int(a[0])
G=int(a[1])
print(2*G-R)

### FIXED CODE ###

a = []
for i in range(2):
    a.append(input()) 
R=int(a[0])
G=int(a[1])
print(2*G-R)
import numpy as np
N = input()
a = []
for i in range(N):
    a.append(input())
dero=np.zeros((25,2))
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]

### FIXED CODE ###

import numpy as np
n=6
a=[int(input()) for i in range(n)]
dero=np.zeros((25,2))
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]
frag=0
for i in range(25):
  if dero[i][0]>dero[i][1]:
    frag=1
if frag==0:
  print("Yay!")
else:
    print(":(")
import math

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

if M == 0:
    if N == 1:
        print(0)
    else:
        print(10**(N-1))
else:
    s = list()
    c = list()

    for i in range(M):
        s_val, c_val = map(int, input().split())
        s.append(s_val)
        c.append(c_val)

    ans = 1000
    for i in range(int(10**(N)-1), int(10**(N-1)-1),-1):
        keta=list()
        for j in range(N):
            keta.append((math.floor(i/(10**j))%10))
        counter = 0
        print(i)
        for k in range(M):

            if keta[N-s[k]] == c[k]:
                counter += 1
            if counter == M:
                ans = i

    elif ans == 1000:
        print(-1)
    else:
        print(ans)


### FIXED CODE ###

import math
 
N, M = map(int,input().split())
 
if M == 0:
    if N == 1:
        print(0)
    else:
        print(10**(N-1))
else:
    s = list()
    c = list()
 
    for i in range(M):
        s_val, c_val = map(int, input().split())
        s.append(s_val)
        c.append(c_val)
 
    ans = 1000
    for i in range(int(10**(N)-1), int(10**(N-1)-1),-1):
        keta=list()
        for j in range(N):
            keta.append((math.floor(i/(10**j))%10))
        counter = 0
        
        for k in range(M):
 
            if keta[N-s[k]] == c[k]:
                counter += 1
            if counter == M:
                ans = i
 
    if N == 1 and M == 1 and c[0] == 0:
        print(0)
 
    elif ans == 1000:
        print(-1)
    else:
        print(ans)
def main():
    s = input()
    n = len(s)
    a = 0
    b = 0
    for i in range(n):
        if i & 1:
            if arr[i] == '1':
                a += 1
            else:
                b += 1
        else:
            if arr[i] == '1':
                b += 1
            else:
                a += 1
        print(min(a, b))
    return 0
main()

### FIXED CODE ###

def main():
    s = input()
    n = len(s)
    a = 0
    b = 0
    for i in range(n):
        if i & 1:
            if s[i] == '1':
                a += 1
            else:
                b += 1
        else:
            if s[i] == '1':
                b += 1
            else:
                a += 1
    print(min(a, b))
    return 0
main()
d=[list(map(int,input().split()))for i in range(3)]
row=int(input())
num=[int(input()) for j in range(row)]
bingo=0
for a in range(3):
  if d[0][a] and d[1][a] and d[2][a] in num:
    bingo=bingo+1
  elif d[a][0] and d[a][1] and d[a][1] in num:
    bingo=bingo+1
if d[1][1] and d[2][2] and d[3][3] in num:
  bingo=bingo+1
elif d[3][1] and d[2][2] and d[1][3] in num:
  bingo=bingo+1
if bingo>0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

d=[list(map(int,input().split()))for i in range(3)]
row=int(input())
num=[int(input()) for j in range(row)]
bingo=0
for a in range(3):
  if d[0][a] in num and d[1][a] in num and d[2][a] in num:
    bingo=bingo+1
  if d[a][0] in num and d[a][1] in num and d[a][2] in num:
    bingo=bingo+1
if d[1][1] in num and d[2][2] in num and d[0][0] in num:
  bingo=bingo+1
if d[1][1] in num and d[0][2] in num and d[2][0] in num:
  bingo=bingo+1
if bingo>0:
  print('Yes')
else:
  print('No')
n = int(input())
LUKAS = [0, 2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803, 141422324, 228826127, 370248451, 599074578, 969323029, 1568397607, 2537720636, 4106118243, 6643838879, 10749957122, 17393796001, 28143753123, 45537549124, 73681302247, 119218851371, 192900153618, 312119004989, 505019158607, 817138163596, 1322157322203, 2139295485799, 3461452808002, 5600748293801, 9062201101803, 14662949395604, 23725150497407, 38388099893011, 62113250390418, 100501350283429, 162614600673847, 263115950957276, (71)425730551631123, 688846502588399, 1114577054219522, 1803423556807921, 2918000611027443, 4721424167835364, 7639424778862807, 12360848946632171, 20000273725560978, 32361122672259149, 52361396397820127, 84722519070079276, 137083915467899403, 221806434537978679, 358890350005878082, 580696784543856761, 939587134549734843]

print(LUKAS[n])

### FIXED CODE ###

n = int(input())
l = [2,1]

for i in range(2,87):
    x = l[i-2] + l[i-1]
    l.append(x)

print(l[n])
N = int(input())
d = {}
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0

for i in range(N):
  x = input()
  d[x] +=1
for j in d.keys():
  print(j + " " + "x" + " " + str(d[j]))
  print("\n")
 
  


### FIXED CODE ###

N = int(input())
if N%1000 == 0:
  print(0)
else:
  
  a = N//1000 + 1
  print(a*1000 -N)
if A+B>C+D:
    print("Left")
elif A+B==C+D:
    print("Balanced")
else:
    print("Right")

### FIXED CODE ###

A,B,C,D=map(int,input().split())
if A+B>C+D:
    print("Left")
elif A+B==C+D:
    print("Balanced")
else:
    print("Right")
n = int(input())
x = list(map(int, input().split()))

for i in range(n):
    x[i] -= i+1

x.sort()
x_ = []
b = 0
if x.count(0) <= n//2:
    for i in range(n):
        if x[i] != 0:
             x_.append(x[i])

    n_ = len(x_)
    if n_%2 == 0:
        b = x_[n_//2]
    else:
        b = x_[n_//2 + 1]

ans = 0
for i in range(n):
    ans += abs(x[i] - b)

print(ans)

### FIXED CODE ###

import statistics
n = int(input())
x = list(map(int, input().split()))

for i in range(n):
    x[i] -= i+1

x.sort()
x_ = []
b = 0
if x.count(0) <= n//2:
    for i in range(n):
        if x[i] != 0:
             x_.append(x[i])

    b = statistics.median(x_)

ans = 0
for i in range(n):
    ans += abs(x[i] - b)

print(int(ans))
N = int(input())
count = 0

c = [[0 for i in range(10)]for j in range(10)]

for i in range(1,N+1):
    str_i = str(i)
    c[int(str_i[0])][int(str_i[-1])] += 1

for j in range(10):
    for k in range(10):
        count += c[j][k] * c[k][j]

print(count)




### FIXED CODE ###

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

if M >= N:
    print('Yes')
else:
    print('No')
def resolve():
    '''
    code here
    '''
    N, H = [int(item) for item in input().split()]
    ab = [[int(item) for item in input().split()] for _ in range(N)]

    a_max = max(ab, key=lambda x:x[0])
    res = H // a_max
    if H % a_max != 0:
        res += 1
    
    temp_attack = res * a_max
    b_delta = [b - a_max for a, b in ab]

    throw_atk_sum = 0
    throw_num = 0

    for item in b_delta:
        if b_delta > 0:
            throw_atk_sum += item
            throw_num += 1

    if throw_atk_sum < temp_attack:
        reduce_num = throw_atk_sum//a_max
        print(res - reduce_num)
    else:
        res = 0
        for a, b in ab:
            H -= b
            res += 1
            if H <= 0:
                break
        print(res)


if __name__ == "__main__":
    resolve()


### FIXED CODE ###

def resolve():
    '''
    code here
    '''
    N, H = [int(item) for item in input().split()]
    ab = [[int(item) for item in input().split()] for _ in range(N)]
    ab.sort(reverse=True, key=lambda x:x[1])
    a_max_ab = max(ab, key=lambda x:x[0])

    cnt = 0    
    for a, b in ab:
        if b > a_max_ab[0]:
            H -= b
            cnt += 1
        
        if H <= 0:
            break

    if H > 0:
        cnt += H // a_max_ab[0]
        if H  % a_max_ab[0] != 0:
            cnt += 1

    print(cnt)


if __name__ == "__main__":
    resolve()
N=int(input())
if N==1:
    print("Hello World")
else:
    A,B=tuple(map(int,input().split()))
    print(A+B)

### FIXED CODE ###

N=int(input())
if N==1:
    print("Hello World")
else:
    A=int(input())
    B=int(input())
    print(A+B)
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b, c = rm()
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
  print('Possible')
else:
  print('Impossible')









### FIXED CODE ###

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = rm()
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
  print('Possible')
else:
  print('Impossible')
import math

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

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


### FIXED CODE ###

import fractions

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

print(a * b // fractions.gcd(a, b))
n = int(input())
l = list(map(int, input().split()))
l.sort()


def calc(l):
    if len(l) == 3:
        return l[1]
    power = l[-2]
    l = l[1:-2]
    return calc(l) + power

print(calc(l))


### FIXED CODE ###

n = int(input())
l = list(map(int, input().split()))
l.sort()
power = 0
for i in range(1,len(l)//3+1):
    power += l[-2*i]
print(power)
# import math これだとエラーになる 3.4なので
from fractions import gcd
a, b = map(int, input().split())

print((a*b)//gcd(a, b))

### FIXED CODE ###

x = int(input())

ans = 0

for _ in range(10**5):
    if x == 2:
        print(x)
        break
    for i in range(2, int(x**0.5) + 1):
        if (x % i) == 0:
            break
        elif i == int(x**0.5): # ループの最後
            ans = x
        else:
            pass

    if ans != 0:
        print(ans)
        break
    else:
        x += 1
import numpy as np
import functools
import math
import collections
import scipy
import fractions
import itertools

def solve():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    now = 0
    print(now)
    hoge= []
    bit = 0
    piyo = 0
    huga = []
    for i in range(k):
        hoge.append(now)
        now = a[now]-1
        if now in hoge:
            huga = hoge[hoge.index(now):len(hoge)]
            piyo = hoge.index(now)
            bit = 1
            break
    ans = huga[(k-piyo)%len(huga)]
    print(ans+1)
    return 0

if __name__ == "__main__":
    solve()

### FIXED CODE ###

def main():
    N, K = map(int, input().split())
    A = [a-1 for a in map(int, input().split())]    # 0-indexed に変換
    B = [None]*N    # 何ステップ目に到達したかを記録。Noneなら未到達を表す
    now = 0         # 現在地
    step = 0        # ステップ数
    B[now] = 0      # 開始地点は、0ステップ目に到達済みとする
    while K:
        now = A[now]    # 現在地を更新 
        step += 1
        K -= 1
        if B[now] is not None:  # ループを検出したら...
            K %= (step - B[now])      # Kからループ長さを引けるだけ引く
        else:
            B[now] = step  # 到達したステップ数を記録
    print(now+1)    # 1-indexed に再変換
 
main()
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline
import numpy as np

def main():
    numbers=[]
    a,b,k = map(int,input().split())
    numbers=np.arange(a,b+1)
    A=set(numbers[:k])
    B=set(numbers[-k:])
    answers = A|B
    
    for i in sorted(answers):
        print("{}".format(i))


if __name__=="__main__":
    main()

### FIXED CODE ###

#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline
import numpy as np

def main2():
    A,B,K=map(int,input().split())
    if A+K-1>=B-K+1:
        for i in range(A,B+1):
            print(i)
    else:
        for i in range(A,A+K):
            print(i)
        for i in range(B-K+1,B+1):
            print(i)

def main():
    numbers=[]
    a,b,k = map(int,input().split())
    numbers=np.arange(a,b+1)
    A=set(numbers[:k])
    B=set(numbers[-k:])
    answers = A|B
    
    for i in sorted(answers):
        print(i)

if __name__=="__main__":
    main2()
def abc127d():
    N, M = (int(s) for s in input().split(" "))
    A = sorted(list(int(s) for s in input().split(" ")))
    for i in range(0, M):
        B, C = (int(s) for s in input().split(" "))
        r = len(list(filter(lambda x: x < C, A[:B])))
        A = sorted([C for n in range(0, r)] + A[r:])
    print(sum(A))
abc127d()


### FIXED CODE ###

def abc127a():
    A, B = (int(s) for s in input().split(" "))
    answer = int(0 if A <= 5 else B / 2 if A <= 12 else B)
    print(answer)

def main():
    abc127a()

main()
import numpy as np
import itertools
 
H, W, K = list(map(int, input().split())) 
c = [input().split() for l in range(H)]
b=[]
d=[]
for m in range(len(c)):
  for item in c[m]:
    item_mod = item.replace("."  , "0")
    item_mod = item_mod.replace("#" , "1")
    b.append(item_mod)
  d.append(b)
  b=[]

C_arr = np.array(d , dtype = "int")
 
In = np.array(list(itertools.product([0,1] , repeat=H)))
Out = np.array(list(itertools.product([0,1] , repeat=W)))
 
ans = 0
for i in range(2**H):
  In_matrix = np.diag(In[i])
  for j in range(2**W):
    Out_matrix = np.diag(Out[j])
    
    In_C = np.dot(In_matrix , C_arr)
    In_C,reshape(H,W)
    In_C_Out = np.dot(In_C , Out_matrix)
    
    ICO = In_C_Out.flatten()
    ICO = ICO.tolist()
    
    if ICO.count(1) == K:
      ans += 1
      
print(ans)

### FIXED CODE ###

H, W, K = list(map(int, input().split()))
 
c = [list(input()) for i in range(H)]
 
cnt = 0
for i in range(2**H):
    for j in range(2**W):
        cnt_black = 0
        for k in range(H):
            if (i >> k) & 1:
                continue
            for l in range(W):
                if (j >> l) & 1:
                    continue
                if c[k][l] == '#':
                    cnt_black += 1
        if cnt_black == K:
            cnt += 1
 
print(cnt)
x = input()
fxsum = sum(map(int, list(x))) 
if int(x)%fxsum==0:
	print("Yes")
else:
	print("No")


### FIXED CODE ###

n, a, b = map(int, input().split())
print(min(n * a, b))
from collections import deque
N, X = map(int, input().split())
L = list(map(int, input().split()))
d = deque([0])
current = 0
for i in range(N):
    current = current + L[i]
    d.append(current)

count = 0
while d.popleft() <= X:
    count += 1

print(count)


### FIXED CODE ###

from collections import deque

N, X = map(int, input().split())
L = list(map(int, input().split()))
d = deque([0])
current = 0
for i in range(N):
    current = current + L[i]
    d.append(current)

lessX = [i for i in d if i <= X]
print(len(lessX))
n,m=map(int,input().split())
q=[list(map(int,input().split())) for _ in range(m)]
for i in range(10**n):
    i=str(i)
    f=1
    for j in q:
        if i[j[0]-1]!=str(j[1]):
            f=0
            break
    if f:
        print(i)
        exit()
print("-1")

### FIXED CODE ###

n,m=map(int,input().split())
l=[list(map(int,input().split())) for _ in range(m)]
for i in range(1001):
    i=str(i)
    if len(i)!=n:
        continue
    f=1
    for s,c in l:
        c=str(c)
        if len(i)<s:
            f=0
            break
        if not i[s-1]==c:
            f=0
            break
    if f:
        print(i)
        exit()
print("-1")
import itertools
 
n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
 
l = [i for i in range(1,n+1)] 
 
pi = 0
qi = 0
 
m = list(itertools.permutations(l))
 
for i in range(len(m)):
	if m[i] == p:
  		pi = i+1
	if m[i] == q:
    	qi = i+1
        
print(abs(pi-qi))

### FIXED CODE ###

import itertools
 
n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
 
l = [i for i in range(1,n+1)] 
 
x = 0
y = 0
 
m = list(itertools.permutations(l))
 
for i in range(len(m)):
	if m[i] == p:
  		x = i+1
	if m[i] == q:
 		y = i+1
        
print(abs(x-y))
import sys
input = sys.stdin.readline
def nibun_right(a, x):
 lo, hi = 0, len(a)
 while lo < hi:
  mid = (lo+hi)//2
  if x < a[mid][0]: hi = mid
  else: lo = mid+1
 return lo
N,D,A=map(int,input().split())
lst=[0]*N
for i in range(N):
 lst[i]=list(map(int,input().split()))
 lst[i][1]=int((lst[i][1]-1)/A))+1
lst.sort()
DMG=[0]*(N+1)
ans=0
for i in range(N):
 renji=nibun_right(lst,lst[i][0]+2*D)
 Z=max(lst[i][1]-DMG[i],0)
 DMG[i]+=Z
 DMG[renji]-=Z
 ans+=Z
 DMG[i+1]+=DMG[i]
print(ans)


### FIXED CODE ###

def nibun_right(a, x, lo=0, hi=None):
 if lo < 0:
  raise ValueError('lo must be non-negative')
 if hi is None:
  hi = len(a)
 while lo < hi:
  mid = (lo+hi)//2
  if x < a[mid][0]: hi = mid
  else: lo = mid+1
 return lo
N,D,A=map(int,input().split())
lst=[0]*N
for i in range(N):
 lst[i]=list(map(int,input().split()))
lst.sort()
DMG=[0]*N
ans=0
for i in range(N):
 if i!=0:
  DMG[i]+=DMG[i-1]
 renji=nibun_right(lst,lst[i][0]+2*D)
 Z=max(int((lst[i][1]-1)/A)+1-DMG[i],0)
 DMG[i]+=Z
 if renji!=N:
  DMG[renji]-=Z
 ans+=Z
print(ans)
x=int(input())
l=[]
for b in range (2,32):
    for i in range (1,10):
        if b**i <=x:
            l.apprnd b**j
print(max(l))

### FIXED CODE ###

x=int(input())
l=[]
for b in range (1,32):
    for i in range (2,10):
        if b**i <=x:
            l.append (b**i)
print(max(l))
ar=[int(i) for i in input().strip().split(" ")]
    ar.sort()
    s=0
    for i in range(1,len(ar)):
        s+=(ar[i]-ar[i-1])
    print(s)

### FIXED CODE ###

ar=[int(i) for i in input().strip().split(" ")]
ar.sort()
s=0
for i in range(1,len(ar)):
    s+=(ar[i]-ar[i-1])
print(s)
import math
A,B = input().split()
print int(A)*int(B.replace('.',''))//100

### FIXED CODE ###

import math
A,B = input().split()
print (int(A)*int(B.replace('.',''))//100)
F = {}

def fib(n):
  global F
  if n < 0:
    print("error")
    exit()
  if n < 2:
    F[n] = 1
    return F[n]
#  F[n] = fib(n-1) + fib(n-2)
  F[n] = F(n-1) + F(n-2)
  return F[n]

n = int(input())
print(fib(n))
#n = int(input())
#print(fib(n))
#fib(44)
#for i in range(5+1):
#  print(F[i])

### FIXED CODE ###

def fibr(n):
    if arr[n] != 0:
        return arr[n]
    if n < 2:
        arr[n] = 1
    else:
        arr[n] = fibr(n-1) + fibr(n-2)
    return arr[n]

n = int(input())
arr = [0 for i in range(n+1)]
print(fibr(n))
a,b,c,d = int(input().split())

s1 = a*b
s2 = c*d

if s1>=s2:
    print(s1)
else:
    print(s2)


### FIXED CODE ###

a,b,c,d = (int(x) for x in input().split())

s1 = a*b
s2 = c*d

if s1>=s2:
    print(s1)
else:
    print(s2)
[S, T] = input().split()
print(S)
print(T)

[A, B] = input().split()

U = input()

if U == S:
    print(f"{int(A)-1} {B}")
else:
    print(f"{A} {int(B) - 1}")


### FIXED CODE ###

[S, T] = input().split()
[A, B] = [int(x) for x in input().split()]
U = input()

if U == S:
    print(A-1, B)
else:
    print(A, B-1)