Hunter

No attempts yetTime limit1sMemory limit128 MB

Problem

In a hunting ground there are NN animals, each living at a particular spot. A hunter may only shoot from MM firing positions that all lie on one straight line. Treat that line as the xx-axis, so each firing position is given by an xx-coordinate x1,x2,,xMx_1, x_2, \dots, x_M. Each animal lives at a spot written with an xx- and a yy-coordinate: (a1,b1),(a2,b2),,(aN,bN)(a_1, b_1), (a_2, b_2), \dots, (a_N, b_N). Every coordinate value describing an animal's position is a positive integer.

If the hunter's gun has range LL, then from a single firing position the hunter can catch any animal whose distance is at most LL. Here the distance between a firing position xix_i and an animal at (aj,bj)(a_j, b_j) is defined as xiaj+bj|x_i - a_j| + b_j.

For example, consider the hunting ground drawn below. (Firing positions are small squares and animal positions are small circles.) If the range LL is 44, the dashed region is the area that can be hunted from the third firing position counted from the left.

Given the firing positions and the animal positions, write a program that prints how many animals can be caught.

Input

The first line contains the number of firing positions MM (1M100,0001 \le M \le 100{,}000), the number of animals NN (1N100,0001 \le N \le 100{,}000), and the range LL (1L1,000,000,0001 \le L \le 1{,}000{,}000{,}000), separated by spaces.

The second line contains the MM xx-coordinates of the firing positions, given as positive integers separated by spaces.

Each of the next NN lines contains one animal's position as its xx-coordinate followed by its yy-coordinate, given as positive integers separated by spaces.

No two firing positions coincide, and no two animals share the same position. Every coordinate value is a positive integer not greater than 1,000,000,0001{,}000{,}000{,}000.

Output

Print, on a single line, the number of animals that can be caught, as a non-negative integer.