n,d,a = list(map(int,input().split()))

raw = []

event = []

for i in range(n):

  x,h = list(map(int,input().split()))

  event.append([x,0,i,h])

for i in range(n):

  tmp = event[i][0] + 2 * d

  event.append([tmp,1,i])

event.sort()

#print(event)

use = [0 for _ in range(n)]

now = 0

ans = 0

for j in range(2*n):

  x,d,i = event[j][:3]

  if d == 0:

    h = event[j][3]

    if h <= now * a:

      pass

    else:

      h -= now * a

      tmp = (h-1)//a+1

      now += tmp

      use[i] = tmp

      ans += tmp

  else:

    now -= use[i]

  #print(x,d,i,ans,now)

print(ans)
n,d,a = list(map(int,input().split()))

attack = [0 for _ in range(n)]

event = []

for i in range(n):

  x,h = list(map(int,input().split()))

  h = (h-1)//a+1

  event.append([x-d,0,h,i])

  event.append([x+d,1,h,i])

event.sort()

#print(event)

ans = 0

now = 0

for j in range(2*n):

  x,m,h,i = event[j]

  if m == 0:

    if h > now:

      attack[i] += h-now

      ans += h-now

      now = h

  else:

    now -= attack[i]

print(ans)
n, d, a = list(map(int, input().split()))
raw = []
event = []
for i in range(n):
    x, h = list(map(int, input().split()))
    event.append([x, 0, i, h])
for i in range(n):
    tmp = event[i][0] + 2 * d
    event.append([tmp, 1, i])
event.sort()
# print(event)
use = [0 for _ in range(n)]
now = 0
ans = 0
for j in range(2 * n):
    x, d, i = event[j][:3]
    if d == 0:
        h = event[j][3]
        if h <= now * a:
            pass
        else:
            h -= now * a
            tmp = (h - 1) // a + 1
            now += tmp
            use[i] = tmp
            ans += tmp
    else:
        now -= use[i]
    # print(x,d,i,ans,now)
print(ans)

n, d, a = list(map(int, input().split()))
attack = [0 for _ in range(n)]
event = []
for i in range(n):
    x, h = list(map(int, input().split()))
    h = (h - 1) // a + 1
    event.append([x - d, 0, h, i])
    event.append([x + d, 1, h, i])
event.sort()
# print(event)
ans = 0
now = 0
for j in range(2 * n):
    x, m, h, i = event[j]
    if m == 0:
        if h > now:
            attack[i] += h - now
            ans += h - now
            now = h
    else:
        now -= attack[i]
print(ans)

-raw = [] +attack = [0 for _ in range(n)] -    event.append([x, 0, i, h]) -for i in range(n): -    tmp = event[i][0] + 2 * d -    event.append([tmp, 1, i]) +    h = (h - 1) // a + 1 +    event.append([x - d, 0, h, i]) +    event.append([x + d, 1, h, i]) -use = [0 for _ in range(n)] +ans = 0 -ans = 0 -    x, d, i = event[j][:3] -    if d == 0: -        h = event[j][3] -        if h <= now * a: -            pass -        else: -            h -= now * a -            tmp = (h - 1) // a + 1 -            now += tmp -            use[i] = tmp -            ans += tmp +    x, m, h, i = event[j] +    if m == 0: +        if h > now: +            attack[i] += h - now +            ans += h - now +            now = h -        now -= use[i] -    # print(x,d,i,ans,now) +        now -= attack[i]