# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Nowadays, CS students try to learn Machine Learning and Artificial Intelligence even before learning the basics of programming which is obviously problem-solving. Eventually, they lose their curiosity about AI as well as CS.

Professor Bakhtiar got very anxious about it and discussed it with his colleague Professor Badhon. They came up with a solution and thought of experimenting if it works or not. But they don’t have enough time to build a system from scratch as they got a conference to attend next week. So now you have to implement the system.

The idea is as to take students who are good at problem solving. You will be given a list of **n** students with the total number of accepted solutions **m** and total number of submissions **s** for each student. If anyone has:

- solved at least 150 problems,
- solved more than or equal to the average number of accepted solutions among students, and
- has no less than 70% acceptance rate

they will be allowed to study AI, otherwise not. You have to count the number of students eligible to study AI.

Input starts with an integer n(0 < n <= 10^{6}), denoting number of students.

Next n lines contains two integer each m, s (0 < m, s <= 10^{9}) , described above.

In one line, Print the answer.

Input | Output |
---|---|

5 10 10 150 214 200 300 1000 1300 100 300 | 1 |

68% Solution Ratio

BigO_cutterEarliest,

RamprosadGFastest, 0.1s

mdvirusLightest, 2.1 MB

realshourovShortest, 194B

Login to submit