Byteasar has a large and pretty garden. He wants to enjoy it after dusk too, so he installed n lamps across the garden.
The lamps are directional: each one lights a fixed angle, and that angle is the same for all of them. Byteasar aligned every lamp to face the same direction. These are solar lamps, so they come with solar panels and no batteries. They still shine at night, because a lamp emits light once enough other lamps shine on it.
Byteasar has also fixed the order in which he supplies the lamps with electricity. Numbering the lamps 1 to n in that order, lamp i receives electricity at time i and emits light from then on. Lamp i also starts emitting light the moment at least ki other lamps shine on it. A lamp switched on this way can switch on further lamps, and no time passes while such a chain runs. A lamp that emits light never goes out.
Find the time at which each lamp starts emitting light.
The first line contains the number of lamps n (1≤n≤200000).
The second line contains four integers X1, Y1, X2, Y2 separated by single spaces (−109≤Xi,Yi≤109, (Xi,Yi)=(0,0)). These four numbers describe the area lit by every lamp. For a lamp at the point (x,y), draw the two rays that start at (x,y) and pass through the points (x+X1,y+Y1) and (x+X2,y+Y2). The two rays form two angles, and the smaller one, together with its boundary, is the area this lamp lights. This angle is always smaller than 180 degrees.
Each of the next n lines holds the position of one lamp. The i-th of them contains two integers xi and yi (−109≤xi,yi≤109) separated by a single space, meaning that lamp i sits at the point (xi,yi). No two lamps share a position.
The last line contains n integers k1,k2,…,kn (1≤ki≤n) separated by single spaces. Lamp i emits light once at least ki other lamps shine on it.
Print one line with n integers t1,…,tn separated by single spaces. The number ti is the time at which lamp i starts emitting light.
In the first example Byteasar powers on lamp 1 at time 1, and lamp 3 emits light at the same moment. Once lamp 2 is powered on at time 2, lamps 1, 2 and 3 all shine on lamp 4, so lamp 4 starts emitting light as well.
