semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,sp,dp,dur,h=0,max=0;//sp=systolic pressure,dp=diabolic pressure,dur=duration
	int i;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d%d",&sp,&dp);
		if(sp>=90&&sp<=140&&dp>=60&&dp<=90){
			h++;
			dur=h;
		}
		else
			dur=h=0;
		if(max>=dur)
			continue;
		else 
			max=dur;
	}
	printf("%d\n",max);
}
int main()
{
int i,n,shou[100],shu[100],time,m=0,t=0;
scanf("%d",&n);
scanf("%d %d",&shou[0],&shu[0]);
if((shou[0]>=90)&&(shou[0]<=140)&&(shu[0]>=60)&&(shu[0]<=90)){
  m=1;
  t=1;
  }
for(i=1;i<n;i++)
{
 scanf("%d %d",&shou[i],&shu[i]);
 if((shou[i]>=90)&&(shou[i]<=140)&&(shu[i]>=60)&&(shu[i]<=90)){
   time=1;
  }
  else {
  time=0;
  }
 if((shou[i-1]>=90)&&(shou[i-1]<=140)&&(shu[i-1]>=60)&&(shu[i-1]<=90)){
    if(time==1){
    m=m+1;
     if(m>t){
     t=m;
     }
    }
    else {
     m=0;
    }   
  }
  if((time==1)&&((shou[i-1]<90)||(shou[i-1]>140)||(shu[i-1]<60)||(shu[i-1]>90))){
  m=1;
  }
}
  printf("%d",t);
  return 0;
}
int main()
{
	int i,n,a[100],b[100],sum=0,max=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %d",&a[i],&b[i]);
	for(i=0;i<n;i++)
	{
		if(a[i]>=90 && a[i]<=140 && b[i]>=60 && b[i]<=90)
		{
			sum++;
		}
		else sum=0;
		if(sum>=max)
			max=sum;
	}
	printf("%d\n",max);
	return 0;
}
int main()
{
   int a[100],b[100],n,i,c=0,d[100];
   scanf("%d",&n);
   for(i=0;i<n;i++){
   scanf("%d%d",&a[i],&b[i]);
   if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
   c++;
   d[i]=0;
}else{d[i]=c;
c=0;}
}
   for(i=0;i<n;i++){
   if(d[i]>d[i+1]){
   d[i+1]=d[i];
}
}
   if(d[n-1]>=c){
   printf("%d\n",d[n-1]);
   }else{
   printf("%d\n",c);
   }
   return 0;
}
int main()
{
	int n, high, low, k = 0, g = 0;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> high >> low;
		if (high <= 140 && high >= 90 && low <= 90 && low >= 60)
			k++;
		else
		{
			if (k > g)
				g = k;
			k = 0;
		}
	}
	if (k > g)
		g = k;
	cout << g << endl;
	return 0;
}
int main(){
int y=0,x=0,n,i,a[100],b[100];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if(i!=n-1&&a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
x++;
}
else if(i!=n-1&&x>y){
y=x;
x=0;
}
else if(i!=n-1&&y>=x){
x=0;
}
else if(i==n-1&&a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90&&y<x+1){
x++;
y=x;
}
else if(i==n-1&&x>y){
y=x;
}
}
printf("%d",y);
return 0;
}
int main(){
	int sum=0,max=0;
	int pre[101][2];
	int n,i=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&pre[i][0],&pre[i][1]);
	}
	for(i=0;i<n;i++){
		if((pre[i][0]>=90)&&(pre[i][0]<=140)&&(pre[i][1]>=60)&&(pre[i][1]<=90)){
			sum++;
			if(sum>max){
				max=sum;
			}
		}else{
			sum=0;
		}
	}
	printf("%d\n",max);
	return 0;
}
void main()
{
	int a[100][2],i,j=0,x=0,n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d",&a[i][0],&a[i][1]);
	for(i=0;i<n;i++)
	{
		if((a[i][0]>=90)&&(a[i][0]<=140)&&(a[i][1]>=60)&&(a[i][1]<=90))
			j++;
		else
		{
			if(x<j)
				x=j;
			j=0;
		}
		if((i==n-1)&&(a[i][0]>=90)&&(a[i][0]<=140)&&(a[i][1]>=60)&&(a[i][1]<=90)&&(x<j))
			x=j;
	}
	printf("%d\n",x);
}
int main (){
  int n,i,sum,temp,m;
  sum=0;
  temp=0;
  int a[200];
  int b[200];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d",&a[i],&b[i]);
  }
  for(i=0;i<n;i++){
    if (a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
     m=1;
    }else {
     m=0;
    }
    if(m==0){
      if(temp>sum){
       sum=temp;
       }
       temp=0;
  }
  else {
   temp++;
  }
  }
    if(temp>sum){
     sum=temp;
    }
   printf("%d",sum);
  return 0;
}
int main()
{
int a[100];
int b[100];
int n,i,max,m;
scanf("%d\n",&n);
for (i=0;i<n;i++){
	scanf("%d %d\n",&a[i],&b[i]);
}
printf("\n");
m=0;
max=0;
for (i=0;i<n;i++){
	if (a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
		m=m+1;
	else{ 
		if (m>max){
			max=m;
		}
	m=0;
	}
}
if (a[n-1]>=90&&a[n-1]<=140&&b[n-1]>=60&&b[n-1]<=90&&m>max)
max=m;
printf("%d\n",max);
return 0;
}
int main()
{int n,i,count[1000]={0},max=0,t=0,m=0;
scanf("%d",&n);
int g[n],d[n],z[n];
for(i=0;i<n;i++){
  scanf("%d %d",&g[i],&d[i]);
}
for(i=0;i<n;i++){ 
   if(g[i]>=90&&g[i]<=140&&d[i]>=60&&d[i]<=90){
    z[i]=1;
   }else{
    z[i]=0;}
}
for(i=0;i<n;i++){
 if(z[i]==1){
    count[m]++;}
 else {
    m++;
    count[m]=0;}
 if(i==n-1)
    t=m+1;
}
for(i=0;i<t;i++){
 if(count[i]>max){
   max=count[i];}
}
printf("%d",max);
return 0;
}
int main()
{
	int a[100],b[100],n,c[100];
	int i,x=0,y=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d %d",&a[i],&b[i]);
	}
	for(i=0;i<n;i++)
	{
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
			x++;
		else{
			c[y]=x;
			y++;
			x=0;
			}
	}
	c[y]=x;
	int e,k;
	for(k=1;k<=y+1;k++){
		for(i=0;i<y+1-k;i++){
			if(c[i]<c[i+1]){
				e=c[i+1];
				c[i+1]=c[i];
				c[i]=e;
			}
		}
	}
	printf("%d\n",c[0]);
	return 0;
}
int main (){
	int i=0,sz1[100],sz2[100],n,sz[100],sza[100],b=1,c,max;
	sz[0]=-1;
	scanf("%d",&n);
	
	for(i=0;i<n;i++){
		scanf("%d %d",&sz1[i],&sz2[i]);
	}
	for(i=0;i<n;i++){
		if(sz1[i]<90||sz1[i]>140||sz2[i]<60||sz2[i]>90){
			sz[b]=i;
			b=b+1;
		}
		
	}
	if(n==1){
		if(b==2){
			printf("0");
		}
		else {printf("1");}
	}
	else {
		
			
			sz[b]=n;
	if(b>1){
		c=b;
		for(i=0;i<c;i++){
		sza[i]=sz[i+1]-sz[i];
	}
	max=sza[0];
	for(i=0;i<c;i++){
		if(max<sza[i]){
			max=sza[i];
		}
	}
	printf("%d",max-1);
	}
	
	else {
		printf("%d",n);
	
			
			
		}
	}
	
			
	
		return 0;
}
int main()
{
	int n,s[100][2],i,j,a[100]={0},m=0,b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		for(j=0;j<2;j++)
		{
			scanf("%d",&s[i][j]);
		}
	}
	for(i=0;i<n;i++)
	{
		if(s[i][0]>=90&&s[i][0]<=140&&s[i][1]>=60&&s[i][1]<=90){
			a[m]++;
		}else{
			m++;
		}
	}
	b=a[0];
	for(i=0;i<n;i++)
	{
		if(a[i]>b){
			b=a[i];
		}
	}
	printf("%d",b);
	return 0;
}
int main(){
	int n,a,b,i,j=0,k=0,l;
	int sz[100];
	scanf("%d",&n);
	for(i=1;i<100;i++){
		sz[i]=0;
	}
	for(i=1;i<=n+1;i++){
		if(i<=n){
			scanf("%d %d",&a,&b);
		}
		if(i==n+1){
			a=1;
			b=1;
		}
			if(a>=90&&a<=140&&b>=60&&b<=90){
			j++;
		}
		else if(j>=1){
			sz[k]+=j;
			k++;
			j=0;
		}
	}
	for(l=0;l<=98;l++){
		if(sz[l+1]<=sz[l]){
						a=sz[l+1];
						sz[l+1]=sz[l];
						sz[l]=a;
		}
	}
	printf("%d",sz[99]);
	return 0;
}
int main()
{int n,i,m,s,t;
 int a[100],b[100],c[100];
 for(i=0;i<100;i++){
 c[i]=0;}
 scanf("%d",&n);
 for(i=0;i<n;i++){
 scanf("%d%d",&a[i],&b[i]);
 if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
 a[i]=1;}
 else{
 a[i]=0;}
 }
 m=0;
 s=0;
 for(i=0;i<n;i++){
 if(a[i]==1){
 s=s+1;
 c[m]=s;}
 if(a[i]==0){
 m=m+1;
 s=0;
 }}
 t=c[0];
 for(i=0;i<n;i++){
 if(c[i]>t){
 t=c[i];}}
 printf("%d",t);
 return 0;
 }
int main()
{
	int bloodpressuremax[101];
	int bloodpressuremin[101];
	int lastingtime[101];
	lastingtime[1] = 0;
	int n , a = 1 ;

	cin >> n;

	for (int i=1 ; i <=n ; i++)
	{
		cin >> bloodpressuremax[i];
		cin >> bloodpressuremin[i];
		if (bloodpressuremax[i] <= 140 && bloodpressuremax[i] >= 90 && bloodpressuremin[i] <= 90 && bloodpressuremin[i] >= 60)
		{
			lastingtime[a] = lastingtime[a] + 1;
		}
		else
		{
			a = a + 1;
			lastingtime[a] = 0;
		}
	}

	int maxtime = 0;
	for (int j = 1; j <= a; j++)
		if (maxtime <= lastingtime[j])
			maxtime = lastingtime[j];

	cout << maxtime << endl;
	return 0;
}
int main(){
  int t,n,sum,i;
  int ru[M][2];
  int m[M];
  sum=0;
  t=0;
  scanf("%d\n",&n);

  for(i=0;i<n;i++){
	  scanf("%d",&ru[i][1]);
      scanf("%d",&ru[i][2]);

	  if(ru[i][1]>89&&ru[i][1]<141&&ru[i][2]>59&&ru[i][2]<91){
		  sum++;
		  m[i]=sum;
	  }else{
		  m[i]=sum;
		  sum=0;
	  }
  }

  for(i=0;i<n;i++){
	  if(m[i]>t){
		  t=m[i];
	  }
  }

  printf("%d",t);


return 0;
}
int main(){
	int n,i,s=0,m,j[100];
	scanf("%d",&n);
	struct point
	{
		int a;
		int b;
	}
	c[100];
	for (i=0;i<n;i++){
		scanf("%d%d",&c[i].a,&c[i].b);
		if (c[i].a>=90 && c[i].a<=140 && c[i].b>=60 && c[i].b<=90){
			s++;
			j[i]=s;
		}else{
			j[i]=0;
			s=0;
		}
	}
	for (i=1;i<n;i++){
		if (j[i]<j[i-1]){
			m=j[i];
			j[i]=j[i-1];
			j[i-1]=m;
		}
	}
	printf("%d\n",j[n-1]);
	return 0;
}
int main ()
{
	int n , i , ss , sz , p , q;
	int a[100];
	for (i = 0 ; i <=99 ; i++)
	{
		a[i] = 0;
	}
	p = 0 ;
	cin >> n ;
	for (i = 1 ; i <= n ; i++)
	{
		cin >> ss >> sz ;
		if ((ss >= 90) && (ss <= 140) && (sz >= 60) && (sz <= 90))
		{
			a[p] = a[p] + 1;
		}
		else 
		{   
			p = p + 1;
		}
	}
		q = 0;
		for (i = 0 ; i <= 99 ; i++)
		{
			if (a[i] > a[q]) 
			{
				q = i ;
			}
		}
	
		cout << a[q] << endl ;
		return 0 ;
	}
int ss[10000],sz[10000],xiaoshi[10000];
int main(){
int i,n,hour=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d\n",&ss[i],&sz[i]);
}
for(i=0;i<n;i++){
if((ss[i])>=90&&(ss[i])<=140&&(sz[i])>=60&&(sz[i])<=90){
    hour++;
    xiaoshi[i]=hour;
    }
    else{
       hour=0;
    }
}   
    int e;
    for(int k=1;k<=n;k++){
       for(int i=0;i<n-k;i++){
       if(xiaoshi[i+1]<xiaoshi[i]){
       e=xiaoshi[i+1];
       xiaoshi[i+1]=xiaoshi[i];
       xiaoshi[i]=e;               }
                              }
                          }
    printf("%d",xiaoshi[n-1]);
    return 0;
}
//****************************
//*???:6.cpp               *
//*??:??                  *
//*????:2013?10?30?     *
//*????:????          *
//****************************
int main()
{
	int n, a, b, t, x, max;  //????n
	cin >> n;
	x = 0;
	max = 0;
	for ( int i = 1; i <= n; i ++ )
	{
		cin >> a >> b;
		t = ( a >= 90 ) && ( a <= 140 ) && ( b >= 60 ) && ( b <= 90 );
		if ( t == 1 )
		{
			x = x + 1;
			if ( x >= max )
				max = x;
		}
		else
		{
			if ( x >= max )
				max = x;
			x = 0;
		}
	}
	cout << max;
	return 0;
}
int main(int argc, char *argv[])
{int a[200],b[200],i,k,j;
int n;
int temp;
int c[200]={0};
scanf("%d",&n);
for(i=0;i<2*n;i++)
{scanf("%d",&a[i]);
                  }
 for(i=0;i<n;i++){
 if(a[2*i]>=90&&a[2*i]<=140&&a[2*i+1]>=60&&a[2*i+1]<=90)
 b[i]=1;
 else
 b[i]=0;                 } 
 for(k=0;k<n;k++)
 for(j=k;j<n;j++)
 {if(b[j]==1)
 c[k]=c[k]+1;
 else
 break;}
  
 for(j=0;j<n;j++)
 {if(c[j]>c[j+1])
    {temp=c[j];
    c[j]=c[j+1];
    c[j+1]=temp;}
                 }   
    printf("%d\n",c[n]);                        
 
  
  
 
  return 0;
}
/**
????6
?  ?????
?  ??10.26
?  ??????
*/

int main()
{
	int n, t=0, hours;
	int p1, p2;
	cin >> n;
	hours = t;

	for(int i = 1;i <= n;i++)
	{
		cin >> p1 >> p2;
		if(p1 <= 140 && p1 >= 90 && p2 <= 90 && p2 >= 60)
			t++;
		if(p1 > 140 || p1 < 90 || p2 > 90 || p2 < 60)
		{   
			t=0;
			continue;
		}
		if(t >= hours)
			hours = t;
	}
	cout << hours << endl;
	return 0;
}
/*
 *???: 1.cpp
 *??????
 *????: 2012-10-15
 *??: ????????n??????????????????????????????
 */


int main ()
{
    int n = 0,iCounter = 1,iHour = 0,iResult = 0,iHigh = 0,iLow = 0;
    cin >> n;
    while (iCounter <= n)
    {
        cin >> iHigh >> iLow;
        if ((iHigh >= 90) + (iHigh <= 140) == 2 && (iLow >= 60) + (iLow <= 90) == 2)
        {
            iHour++;                                                                    //???? ??????1
            if (iResult < iHour)
                iResult = iHour;                                                        //?????????
        }
            
        else iHour = 0;                                                                 //?? ??????
        iCounter++;
    }
    cout << iResult << endl;
    return 0;
}
int main(){
	int n,i,a,b,sz[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&a,&b);
        if(a>=90&&a<=140&&b<=90&&b>=60){
			sz[i]=1;
		}else{
			sz[i]=0;
		}
	}
	int k,c,d=0,m=0;
	for(k=m;k<n;k++){
		c=0;
		if(sz[k]==1){
			for(i=k;i<n;i++){
                if(sz[i]==1){
					c++;
				}else{
					m=i;
					break;
				}
			}
		}
		if(c>d){
			d=c;
		}
	}
	printf("%d",d);
	return 0;
}
int main(){
	int n,a,b,i,s[100]={0},k=0,j,t;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&a,&b);
		if(a>=90&&a<=140&&b>=60&&b<=90){
			s[k]++;
		}
		else k++;
	}
	for(i=1;i<k+1;i++){
		for(j=0;j<k+1-i;j++){
			if(s[j]>s[j+1]){
				t=s[j+1];
				s[j+1]=s[j];
				s[j]=t;
			}
		}
	}
	printf("%d\n",s[k]);
	return 0;
}
int main()
 { int n,a,b,sz[100],m=0,j=0,max=0,i;
   scanf("%d\n",&n);
   for(j=0;j<=99;j++)
   sz[j]=0;
   
   j=0;
   for(i=0;i<=n-1;i++)
   {scanf("%d %d\n",&a,&b);
    if(a>=90&&a<=140&&b>=60&&b<=90)
    { m=m+1;
     sz[j]=m;
     }
      else {j=j+1;
           sz[j]=0;
            j=j+1;
             m=0;}
    }
    
    for(j=0;j<=99;j++)
    {if(sz[j]>max)
     max=sz[j];}
   printf("%d",max);
   return 0;
}
int main()
{
	int n,a,b,t;
	int s[100]={0},e[100]={0};
	int i,k=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
		scanf("%d %d",&a,&b);
		if(a<=140&&a>=90&&b>=60&&b<=90){
			s[i]=1;
		}
	}
	for(i=0;i<n;i++){	
		if(s[i]==0)
			k++;
	    if(s[i]==1)
		   e[k]++;
		
	}
	for(i=1;i<=k;i++){
			if(e[i]>e[0])
			  e[0]=e[i];
	}
	printf("%d",e[0]);
	return 0;
}
int main()
{
	int n,a[100],b[100],c=0,sum=0;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{	
		scanf("%d %d",&a[i],&b[i]);
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
		{
			sum++;
			if(sum>c) c=sum;
		}
		else 
		{
			sum=0;
			continue;
		}

	}
	printf("%d",c);
	return 0;
}
int main()
{
int n,m=0,k=0,b=0,i;
int a[100][2];
scanf("%d",&n);
for(i=0;i<100;i++)
a[i][1]=0;
for(i=0;i<n;i++)
{
scanf("%d %d\n",&a[i][1],&a[i][2]);
}
for(i=0;i<n;i++)
{
if(a[i][1]>=90&&a[i][1]<=140&&a[i][2]>=60&&a[i][2]<=90)
{k=k+1;
    if(k>b) b=k;}
else
k=0;
}
printf("%d",b);
return 0;
}
int main()
{
	int n, i, m, b;
	scanf("%d", &n);
	int a[2*n+2];
	for(i=1; i<=2*n; i++)
		scanf("%d", &a[i]);
	m=0;
	b=0;
	for(i=1;i<=2*n;i=i+2)
	{
		if(a[i]>=90 && a[i]<=140 && a[i+1]>=60 && a[i+1]<=90)
		{
			m=m+1;
			if(m>b)
				b=m;
		}	
		else
			m=0;
	}
	printf("%d", b);

	return 0;
	
}
int main()
{
	int i,n,p1[100],p2[100],t[100],c=0,max=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
	     scanf("%d%d",&p1[i],&p2[i]);
		 if(((p1[i]>=90)&&(p1[i]<=140))&&((p2[i]>=60)&&(p2[i]<=90)))
			 t[i]=1;
		 else
			 t[i]=0;
	}
	for(i=0;i<n;i++){
		if(t[i]==1){
		     c++;
			 if(c>max)
				 max=c;
		}
		else{
		    c=0;
		}
	}
	printf("%d",max);
	return 0;
}
int main()
{
    int n,i,m=0,a,b,max=0;
    scanf("%d",&n);
    for(i=1;i<=n;i=i+1){
                        scanf("%d %d",&a,&b);
                        if(a>=90&&a<=140&&b>=60&&b<=90){
                                                    m=m+1;
                                                    }
                        else{
                             if(m>max){ max=m;}
                            
                             m=0;
                             }                            
                                                    
                        
                        
                        }
  if(m>max){ max=m;}                      
  if(max==0){printf("%d\n",m);}
  
  
  else{printf("%d\n",max);}
	
  return 0;
}
int main()
{
    int n;
    scanf("%d",&n);
    int i,k,m,a[n],b[n],j[n];
    k=0; 
    for(i=0;i<n;i++) scanf("%d %d",&a[i],&b[i]);
    for(i=0;i<n;i++) j[i]=0;
    for(i=0;i<n;i++)
    {
        if(a[i]>=90&&a[i]<=140&&b[i]<=90&&b[i]>=60) j[k]++;
        else 
        {
            k++;
        }
    }
     for(k=0;k<n;k++)
    {
            if(j[0]<j[k]) {j[0]=m; j[0]=j[k]; j[k]=m;}
     }
    printf("%d\n",j[0]);
    return 0;
}
int main (){
    int n,a,b,k=0,i=0;
    scanf("%d",&n);
    while(n--){
               scanf("%d%d",&a,&b);
               if(a<=140&&a>=90&&b<=90&&b>=60){
               i++;
               if(k>i){k=k;}
               if(k<=i){k=i;}
               }
               else{
                    i=0;}
                    }
       printf("%d",k);
 
       return 0;
       }
int main()
{	
int n;	
scanf("%d",&n);	
int x,y,a;	
int i=0,b=0;	
if(n==1)	
{	  
scanf("%d %d",&x,&y);	  
if(x<90||x>140||y<60||y>90)	 
 {	 
   b=0; 
	  }
	  else	
  {	  
  b=1;	 
 }	
}	
else
	{	
  while(1)	
  {	  
  i++;		
if(i==n+1)	
	{	
	  a=n+1;
		  b=n;	
	  break;	
	}		
scanf("%d %d",&x,&y);	
	if(x<90||x>140||y<60||y>90)	
	{		
  a=i;		
  b=a-b-1;	
	  break;
		}
	  }	 
 while(i<=n&&i>=a)	
  {	
    i++;
		if(i==n+1)
		{	
	  if(n-a>b)	
	  {		
    b=n-a;		
	break;		
  }		  else	
	  {		    b=b;			break;		  }		}		scanf("%d %d",&x,&y);		if(x<90||x>140||y<60||y>90)		{		  if(i-a-1>b)		  {		    b=i-a-1;			a=i;		  }		  else		  {		    b=b;			a=i;		  }		}	  }	}	printf("%d",b);	return 0;}
int main()
{int n,a[1000],b[1000],i,max=0,res=0;
cin>>n;
for(i=1;i<=n;i++)
  {cin>>a[i]>>b[i];
   if(a[i]<=140&&a[i]>=90&&b[i]<=90&&b[i]>=60)
   max=max+1;
   else max=0;
   if(max>res) res=max;
  }
cout<<res<<endl;  
return 0;        
}
int main(){
   int n,a[100],b[100],c[100];
   int i,e1,e2,s2=0,y=0,s1=0;
   int w=0,s=0;
   scanf("%d",&n);
   for(i=0;i<n;i++){
   scanf("%d %d",&(a[i]),&(b[i]));
   }


   for(i=0;i<n;i++){
	   if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
	   c[i]=1;
	   }else{c[i]=0;}
   }


   for(i=0;i<n;i++){
	   if((c[0]==1&&i==0)||(c[i-1]==0&&c[i]==1)){ e1=i;

	   {

		for(i=e1;i<n;i++){

			if((c[n-1]==1&&i==n-1)||(c[i]==1&&c[i+1]==0)){e2=i;break;}
	  	}
		y=e2-e1+1;
		if(y>s2){s2=y;}
		y=0;
	   }


	   }else{continue;}
   }




	printf("%d",s2);



	return 0;
}
int main(void)
{
     int n,h,l,i,j=0,k=0;
     scanf("%d",&n);
     for(i=1;i<=n;i++)
     {
           scanf("%d %d",&h,&l);
           if((h<90)||(h>140)||(l<60)||(l>90)) j=0;
           if((h<=140)&&(h>=90)&&(l<=90)&&(l>=60)) 
           {j++;
            if(j>=k) k=j;}         
                      
     }
     printf("%d",k);
return 0;
}
//******************************
//* &sup3;&Igrave;&ETH;ò&Atilde;&ucirc;&pound;&ordm;&Otilde;&yacute;&sup3;&pound;&Ntilde;&ordf;&Ntilde;&sup1;          ** 
//* ×÷&Otilde;&szlig;&pound;&ordm;&Agrave;&icirc;&Otilde;&aelig;&Ograve;&raquo; 1300012948   ** 
//* &Ecirc;±&frac14;&auml;&pound;&ordm; 2013.10.24         ** 
//******************************
int main()
{
    int n, shou, shu, p = 0, q = 0, k;
    cin >> n;
    for(int i = 1; i <= n; i++)
    {
            cin >> shou >> shu;
            k = ((shou >= 90)&&(shou <= 140)&&(shu >= 60)&&(shu <= 90));
            q += k;
            if(k == 0)
            {
                 q = 0;
                 continue;
            }
            p = p >= q ? p : q;    
            
    }
    cout << p << endl;
    return 0;
}
int main()
{
 int n,m,i,j,f,e,d,k;
 int q[10000],p[10000];
 e=0;
 k=0;
 scanf("%d",&n);
 for(i=0;i<n;i++){
	 scanf("%d %d",&q[i],&p[i]);
	 if(q[i]<=140&&q[i]>=90&&p[i]>=60&&p[i]<=90)e++;
	 else e=0;
	 if(k<e)k=e;
 }



printf("%d",k);


 return 0;
}
int main()
{
	int n,shousuo[100],shuzhang[100],zanshi[100];
	int i,j,e;
	j=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&shousuo[i],&shuzhang[i]);
	}
	for(i=0;i<n;i++){
		if(shousuo[i]>=90&&shousuo[i]<=140&&shuzhang[i]>=60&&shuzhang[i]<=90&&i<n-1){
			j=j+1;
			zanshi[i]=0;
		}else if(shousuo[i]>=90&&shousuo[i]<=140&&shuzhang[i]>=60&&shuzhang[i]<=90&&i==n-1){
			j=j+1;;
			zanshi[i]=j;
		}
		else if(shousuo[i]<90||shousuo[i]>140||shuzhang[i]<60||shuzhang[i]>90){
			zanshi[i]=j;
			j=0;
		}
	}
	for(i=0;i<n-1;i++){
		if(zanshi[i]>zanshi[i+1]){
			e=zanshi[i];
			zanshi[i]=zanshi[i+1];
			zanshi[i+1]=e;
		}
	}
	printf("%d",zanshi[n-1]);
	return 0;
}
//********************************
//*????5.cpp                **
//*???????               **
//*?????? 1200012834      **
//*???2012.10.14             **
//********************************

int main()
{
	int n,i,j;   // ?? 
	cin >> n;
	int a[n],b[n],c[n],max;
	for(i=0;i<n;i++)
		cin >> a[i] >> b[i];
	for(i=0;i<n;i++)
        c[i]=0; 
    for(i=0;i<n;i++)
    {
        if(a[i]>=90 && a[i]<=140 && b[i]>=60 && b[i]<=90)
            c[i]=1; 
        for(j=i+1;j<n;j++)
        { 
            if(a[j]>=90 && a[j]<=140 && b[j]>=60 && b[j]<=90)
                c[i]++;
            else break;
        }
    }
    max=c[0];
    for(i=1;i<n;i++)
        if(c[i]>max)
            max=c[i]; 
    cout << max << endl;
    return 0;
}
int main()
{
	int i=0, j=0, n, cnt=0, max=0, a[101][2];
	cin >> n;
	for (int i=0; i<n; i++)
		for (int j=0; j<2; j++)
			cin >> a[i][j];
	for (int i=0; i<n; i++)
	{
		if (a[i][0]<=140 && a[i][0]>=90 && a[i][1]<=90 && a[i][1]>=60 )
			cnt++;
		else
			cnt = 0;
		if (max<cnt)
			max = cnt;	 
	}
	cout << max << endl;
	return 0;
}
int main()
{
    int n,i,sou[max],su[max],a=0,h[max],m;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d%d",&(sou[i]),&(su[i]));
    }
    for(i=0;i<n;i++)
    if((sou[i]>=90)&&(sou[i]<=140)&&(su[i]>=60)&&(su[i]<=90))
    {
        a++;
        h[i]=a;
    }else{
        h[i]=0;
        a=0;
    }
    m=h[0];
    for(i=0;i<n;i++)
    {
        if(m<h[i]){
            m=h[i];
        }
    }
    printf("%d",m);
    return 0;
}
struct patient
    {int x;
    int y;
           }p[100];
int main()
{
    int max=0;
    int n;
    cin>>n;
    int k=0;
    int i;
    for(i=1;i<=n;i++)
    scanf("%d %d",&p[i].x,&p[i].y); 
    for(i=1;i<=n;i++)
   { 
    if(p[i].x>=90&&p[i].x<=140&&p[i].y<=90&&p[i].y>=60)
    k++;
    else k=0;
    
    if(max<=k)
    max=k; 
    } 
cout<<max;


return 0;

}
//******************************************************************************
//???? ???? 
//?????? 
//???10-24 
//******************************************************************************
int main()
{
	int n;
	int shousuo[100];                            //???????? 
	int shuzhang[100];                           //???????? 
	int count = 0;                               //??????????? 
	int result = 0;                              //????????????? 
	
	cin >> n;
	 
	for(int i = 0; i < n; i ++)                  //?????? 
	cin >> shousuo[i] >> shuzhang[i];
	
	for(int j = 0; j < n; j ++)                  //?????count++?????result?????result 
	{
		if(shousuo[j] >= 90 && shousuo[j] <= 140 && shuzhang[j] >= 60 && shuzhang[j] <= 90)
		{
			count ++;
			
			if(count > result)
			result = count;
		}
		
		else                                     //??????count=0?????result?????result 
		{
			if(count >= result)
			result = count;
			
			count = 0;
		}
	}
	
	cout << result << endl;
	
	return 0;
}
int main(){
    int n,a,b,d,s[1000],c[1000];
	scanf("%d",&n);
	for(a=0;a<n;a++){
		c[0]=0;
       scanf("%d %d",&b,&d);
	   if(b>=90&&b<=140&&d>=60&&d<=90){s[a]=1;c[a+1]=c[a]+s[a];}else{s[a]=0;c[a+1]=0;}
	}
	int e,k,i;
	for(i=1;i<=a+1;i++){
		for(k=0;k<a+1-i;k++){
			if(c[k]>c[k+1]){e=c[k];c[k]=c[k+1];c[k+1]=e;}
		}
	}
    printf("%d",c[a]);
	return 0;
}
int main()
{
	int n,a[101],b[101],c[101],i,j,s;
	i=1;
	j=0;
	scanf("%d",&n);
	while(i<=n)
	{
		scanf("%d%d",&a[i],&b[i]);
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
		{
			j=j+1;
			c[i]=j;
		}
		else
		{
			c[i]=j=0;
		}
		i++;
	}
	s=c[1];
	for(i=1;i<=n;i++)
	{
		if(s<c[i])
		{
			s=c[i];
		}
	}
	printf("%d\n",s);
	return 0;
}
int main(){
	int n,i,max,l,r,s[100]={0},z=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&l,&r);
		if(l>=90&&l<=140&&r>=60&&r<=90){
			s[z]++;
		}else{
			z++;
		}
	}
	if(l>=90&&l<=140&&r>=60&&r<=90){
		z++;
	}
	for(i=0;i<z;i++){
		if(i==0||max<s[i]){
			max=s[i];
		}
	}
	printf("%d",max);
	return 0;
}
int main() 
{ 
	int n;
	int m=0;
	int k=0;
	int i=0;
	int maxk=0;
	scanf("%d",&n);
	int szsmall[n],szlarge[n],sz[n];
	for(i=0;i<n;i++)
	{
		scanf("%d",&szlarge[i]);
		scanf("%d",&szsmall[i]);
	}
	for(i=0;i<n;i++)
	{
		if(szsmall[i]<=90 && szsmall[i]>=60 && szlarge[i]<=140 && szlarge[i]>=90)
		{
			sz[i]=1;
		}
		else
		{
			sz[i]=0;
		}
	}
	while(1)
	{	
		k=0;
		for(i=m;i<n;i++)
		{
			if(sz[i]==1)
			{
				k=k+1;
				m=i+1;
				if(k>maxk)
				{
					maxk=k;
				}
				if(m==n)
				{
					break;
				}
				if(sz[m]==0)
				{
					break;
				}
			}
			else
			{
				continue;
			}
		}
		if(m==n||i==n)
		{
			break;
		}
	}
	printf("%d",maxk);
	return 0;
}
int main()
{
	int n,j,i,max,f[100],g[100],k[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d %d",&f[i],&g[i]);
	}
	j=0;
	max=0;
	for(i=0;i<n;i++)
	{
		if(f[i]>=90&&f[i]<=140&&g[i]>=60&&g[i]<=90)
		{
			j=j+1;
			k[i]=j;
		}
		else
		{
			k[i]=j;
  			j=0;
		}
	}
	for(i=0;i<n;i++)
	{
		if(k[i]>k[max])
		{
			max=i;
		}
	}
	printf("%d\n",k[max]);
	return 0;
}
int main()
{
	int i,j,M,m,min[120],max[120],n;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d %d",&min[i],&max[i]);
	}
	m=1;
	int jieguo[120]={0};
	for(i=1;i<=n;i++){
		if(min[i]>=90&&min[i]<=140&&max[i]>=60&&max[i]<=90){
			jieguo[m]=1;
			for(j=1;(i+j)<=n;j++){
				if(min[i+j]>=90&&min[i+j]<=140&&max[i+j]>=60&&max[i+j]<=90){
					jieguo[m]++;
				}else{
					break;
				}
			}
			m++;
		}
	}
	M=jieguo[1];
	for(i=2;i<=100;i++){
		if(jieguo[i]>=M){
			M=jieguo[i];
		}else{
			continue;
		}
	}
	printf("%d",M);
	return 0;
}