Racing Gems

Collect as many gems as possible while running upward with limited sideways speed from any start position.

Medium7Dynamic programmingSortingBinary searchNo attempts yetTime limit2sMemory limit256 MB

Problem

You are playing a racing game. Your character starts on the xx axis (y=0y = 0) and runs up the track, which is bounded by the line x=0x = 0 on one side and by the line x=wx = w on the other. You may start anywhere along the starting line, as long as the position is inside the track. The finish line is y=hy = h, and the game ends when you reach it.

Your vertical velocity is fixed at vv. Your horizontal velocity, on the other hand, can be any value between v/r-v/r and v/rv/r, and you may change it at any time.

There is one gem at each of nn fixed points on the track. You want to collect as many gems as possible. How many gems can a single run collect?

Input

The first line contains four space separated integers nn, rr, ww, and hh (1n1051 \le n \le 10^5, 1r101 \le r \le 10, 1w,h1091 \le w, h \le 10^9).

Each of the next nn lines contains two space separated integers xix_i and yiy_i, the coordinates of the iith gem (0xiw0 \le x_i \le w, 0<yih0 < y_i \le h). No two gems share a position.

The input does not contain a value for vv.

Output

Print, on a single line, the largest number of gems that can be collected during the race.