|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||0||0||0||0.000%|
In the middle of the Hundred Acre Wood there is a huge oak. Squirrel Barbara lives in one of this oak's hollows. Each day she walks along the forest in a quite unusual way. She starts her walk near the oak, facing North, and in each unit of time she performs a move in the following way:
Your task is to count the number of nuts lying on the ground after t units of time.
The first line of the input contains one integer n (0 ≤ n ≤ 7), the number of nuts that were lying on the ground at time 0. The following n lines describe the nuts' locations: each of them contains two integers x and y (-2 ≤ x,y ≤ 2), separated by a single space. Such a line means that the nut lies x meters to the East and y meters to the South from the oak. You can assume that no two nuts lie in the same location. The last line of input contains one integer t (0 ≤ t ≤ 109), the number of units of time that passed since Barbara started her walk.
The first and only line of the output should contain one non-negative integer, the number of nuts that are lying on the ground after t units of time. We assume that Barbara has an unlimited number of nuts.
2 0 0 -2 1 8