#0001BA

machines

There are N special machines. Each machine emits radio-waves with some power in some radius, but each machine will be destroyed if it receives strictly stronger radio-wave then it's stability point.All machines are on one line.


InputFrom first line read N, number of machines (1<=N<=10^5). Next N lines contains 4 number representing position, power of radio-wave, radius of radio-wave and stability of i-th machine (1<=position,power,radius,stability<=10^9). There won't be 2 machines with same position.

OutputYou should write number of machine that will be destroyed.


Input:
5
5 1 2 10
4 5 5 5
7 7 6 4
1 9 4 8
50 4 0 3

Output:
4
All except first machine will be destroyed.
Note that machine can destroy it self if it emits stronger radio-wave then it's stability point.
You can't sum radio-waves !!!

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.