Time Limit: 3000MS
Memory Limit: 131072KB
There're n fishes in a river holding a swimming match. The river just looks like x-axis, each fish has it's own start coordinate Xi, and heads towards the positive direction with the constant speed Vi. Between the match, transcendence will happen, it's specific definition is that: there're two fishes whose names are A and B, at a moment, A is ahead of B, but after a while, A is after B, that we call it transcendence. Now you need to calculate how many times does transcendence happen.
Multiple cases, end with EOF.
In each case, the first line is an integer n (1 < n < 10001), following with n lines, each line contains of two positive integers Xi, Vi (type of 32-bit signed integer), means the start point of each fish and its speed.