Dick Dastardly wants to torment the gophers living along a straight mountain ridge. The ridge has n gopher holes in a row, indexed 1 to n from west to east. Hole 1 sits at the origin (distance 0), and hole i (for 2≤i≤n) sits xi meters east of hole 1, with x2<x3<⋯<xn.
Dick placed m CD players along the ridge; player j sits zj meters east of hole 1. Each player disturbs every hole within l meters of it: a hole at distance p from hole 1 is disturbed by a player at distance z whenever ∣p−z∣≤l. A hole's gopher cannot sleep if at least one CD player disturbs that hole.
Over d days the players are rearranged. On the morning of day i, Dick moves the player currently located pi meters from hole 1 to a point ri meters from hole 1. Immediately before each move, position pi holds exactly one player and position ri holds none.
Report the number of holes whose gophers cannot sleep at the required moments.
The first line contains four integers n, m, d, l (2≤n,m≤500000, 1≤d≤500000, 1≤l≤109): the number of holes, the number of CD players, the number of days, and each player's range.
The second line contains n−1 integers x2,x3,…,xn (0<x2<x3<⋯<xn≤109): the distances of holes 2,3,…,n from hole 1.
The third line contains m integers z1,z2,…,zm (0≤z1<z2<⋯<zm≤109): the distances of the CD players from hole 1; every player lies east of hole 1.
Each of the next d lines contains two integers pi and ri (0≤pi,ri≤109, pi=ri): on day i the player at distance pi is moved to distance ri. Immediately before each move a player is guaranteed to be at position pi and no player is at position ri.
Output d+1 lines. For i=1,2,…,d, line i must contain the number of sleepless holes in the state just before the i-th move. Line d+1 must contain the number of sleepless holes after the last move.
(Equivalently: print the count for the initial arrangement, then, after applying each of the d moves in order, print the new count.)