#t496. 正常血压
正常血压
Normal Blood Pressure
Problem Description
In the intensive care unit, a patient's blood pressure is measured once every hour. A measurement is called normal if the systolic pressure is between and (inclusive) and the diastolic pressure is between and (inclusive). Given several measurements of a patient, compute the longest number of consecutive hours during which the blood pressure stayed normal.
Input Format
The first line contains a positive integer ().
The following lines each contain two positive integers: the systolic and diastolic pressures of one measurement, separated by a single space.
Output Format
Output a single line containing the longest number of consecutive hours with normal blood pressure.
Sample Input
4
100 80
90 50
120 60
140 90
Sample Output
2