semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main() {
	int N;
	cin >>N;
	const int n=N;
	int high[n];
	int low[n];
	for (int i=0;i<=n-1;i++)
	{
		cin >>high[i]>>low[i];
	}
	int contin[n];
	for (int i=0;i<=n-1;i++)
	{
		contin[i]=0;
	}
	for (int k=0;k<=n-1;k++)
	{
		for (int i=k;i<=n-1;i++)
		{
			if ((high[i]>=90)&&(high[i]<=140)&&(low[i]>=60)&&(low[i]<=90))
			{
				contin[k]=contin[k]+1;
			}
			else
				break;
		}
	}
	int max=contin[0];
	for (int i=0;i<=n-1;i++)
	{
		if (contin[i]>max)
			max=contin[i];
	}
	cout <<max<< endl;
	return 0;
}
int main()
{
	int i,n,SBP[100],DBP[100],c[100],temp=0,max=0;
	scanf("%d",&n);
	for(i=0;i<=(n-1);i++)
	{
		scanf("%d",&SBP[i]);
			
		scanf("%d",&DBP[i]);
}
	for(i=0;i<=(n-1);i++)
	{
		if((90<=SBP[i]&&SBP[i]<=140)&&(60<=DBP[i]&&DBP[i]<=90))
			c[i]=1;
		else
			c[i]=0;
	}

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

		max=(temp>max)?temp:max;
	}

	printf("%d",max);
	return 0;
	
}
int main()
{
	int a[100],b[100],i,n,max=0,count=0;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i]>>b[i];
	}
	for(i=0;i<n;i++)
	{
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
		{
			count++;
			if(count>max)
				max=count;
			continue;
		}
		count=0;
	}
	cout<<max;
	return 0;
}
/*
 * ????xueya.cpp
 * ??????
 * ?????2012 10 21
 * ??:??????????????
 */



int main(){
    int n,h,l,t,i,T; //????
    cin >>n; //??????
    i=t=T=0;  //????????????????0
    while(++i<=n){ //??????????????
    	cin >>h >>l;   //????????
    	t=(140>=h && h>=90 && 90>=l && l>=60)?t+1:0;   //?????????+1?????????
    	T=(t>T)?t:T;  //????????????????????????
    }
    cout <<T<<endl;  //???????
    return 0;
}
int main(){
	int n,shou,shu,h,max,i;
	scanf("%d\n",&n);
	max=0;
	h=0;
	for(i=1;i<=n;i++){
		scanf("%d%d",&shou,&shu);
		if(shou>=90&&shou<=140&&shu>=60&&shu<=90){
			h++;
		}else{
			if(max<h){
				max=h;
			}
			h=0;
		}
	}
if(max<h){
				max=h;
			}
	printf("%d\n",max);
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	int a[100][2];
	int ci[100]={0},m=0;
	int i,j;
	for(i=0;i<n;i++)
	{
		for(j=0;j<2;j++)
		{
			scanf("%d",&a[i][j]);
		}
		if(a[i][0]>=90&&a[i][0]<=140&&a[i][1]>=60&&a[i][1]<=90)
		{
			ci[m]++;
		}
		else
		{
			m++;
		}
	}
	int max=ci[0];;
	for(i=0;i<m+1;i++)
	{
		if(ci[i]>max)
		{
			int e;
			e=ci[i];
			ci[i]=max;
			max=e;
		}
	}

	printf("%d",max);


	return 0;
}
void main(){
	int i,n,s=0,t=0;
	scanf("%d",&n);
	int a[100],b[100];
	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)
		{
			t++;
		}
		else
		{
			if(s<t)
			{
				s=t;
			}
			t=0;
		}
	}
	if(s<t)
			{
				s=t;
			}
	printf("%d",s);
}
int main(){
    int n,a,b,i,c[100],d;
    scanf("%d",&n);
    c[0]=0;
    d=0;
    for(i=1;i<=n;i++){
                      scanf("%d %d",&a,&b);
                      if(90<=a&&a<=140&&60<=b&&b<=90){
                                                      c[i]=c[i-1]+1;
                                                      }
                      else{
                           c[i]=0;
                           }
                      if(c[i]>d){
                                      d=c[i];
                                      }
                                      }
    printf("%d",d);
    return 0;
}
/*
  Name: ??(5-5) ????
  Author: 120012757(chenminhuan)
  Date: 15/10/12 18:28
*/

int n,ans,cnt,a,b;
int main()
{
   
    cin>>n;                                             //read in times
    ans = 0;                                            // answer
    cnt = 0;                        
    while (n--){
          cin>>a>>b;
          if(a>=90 && a<=140 && b>=60 && b<=90) cnt++;  
          else
          {
              if(cnt>ans) ans = cnt;
              cnt = 0;
          }
    }
    if (cnt>ans) ans = cnt;
    cout<<ans<<endl;
    return 0;
}
int main(){
	int n,i,m=0,j=0;
	struct p{
		int u,v;
	}p[100];
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&p[i].u,&p[i].v);
		if(p[i].u>=90&&p[i].u<=140&&p[i].v>=60&&p[i].v<=90){
			j=j+1;
			if(j>m)
				m=j;
		}
		else{
			j=0;
		}
	}
	printf("%d",m);
	return 0;
}
int main()
{
	int i,j,s,h,l,n,a,e;
	int t[100];
	scanf("%d",&n);
	s=0;

	for(i=0;i<100;i++)
		t[i]=0;

	for(i=1;i<=n;i++)
	{
		scanf("%d %d",&h,&l);
		if((h<=140)&&(h>=90)&&(l<=90)&&(l>=60))
		{
			s++;
			t[i-1]=s;
		}
		else
			s=0;
	}

	for(i=1;i<100;i++)
	{
		for(j=0;j<100-i;j++)
		{
			if(t[j]>t[j+1])
			{
				e=t[j];
				t[j]=t[j+1];
				t[j+1]=e;
			}
		}
	}

	printf("%d\n",t[99]);
	return 0;
}
int main()
{
	int n,i,j,a[100],b[100],c[100]={0},max=0,f=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]<=90&&b[i]>=60) 
		{
			c[i]=0;
			for(j=i;j<n;j++)
				if(a[j]>=90&&a[j]<=140&&b[j]<=90&&b[j]>=60) 
					c[i]++;
				else break;
		}
}
for(i=0;i<n;i++)
{
	if(c[i]>max)
	{
	int tmp;
	tmp=c[i];
	c[i]=max;
	max=tmp;
	}
}
printf("%d",max);
return 0;
}
void main()
{
	int n,a[100],b[100];
	scanf("%d",&n);
	int m=0;
	int i=0;
	for (i;i<n;i++)
	{
		scanf("%d%d",&a[i],&b[i]);
	}
	i=0;
	while(i<n)
	{
		int s=0;
		while(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90&&i<n)
		{
			s++;
			i++;
		}
		if (s>m)
		{
			m=s;
		}
		i++;
	}
	printf("%d",m);
}
int main()
{
int xy[2],ok[100];
int i,n,max=0,t=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d%d",&xy[0],&xy[1]);
if(xy[0]<=140&&xy[0]>=90&&xy[1]<=90&&xy[1]>=60)
ok[i]=1;
else
ok[i]=0;
}
for(i=1;i<=n;i++)
{
if(ok[i]==1)
t++;
else
t=0;
if(t>max)
max=t;
}
printf("%d",max);

return 0;
}
int main(){
   int i,j=0,t=0,n,k,e,ss[101],sz[101],sz2[101];
   scanf("%d",&n);
   for(i=0;i<n;i++){
       scanf("%d%d",&ss[i],&sz[i]);
   }
   for(i=0;i<n-1;i++){
       if((ss[i]>=90)&&(ss[i]<=140)&&(sz[i]>=60)&&(sz[i]<=90)){
	     j++; 
	   }
	   else{
		 sz2[t]=j;
		 t++;
	     j=0;
	   }
   }   
   if((ss[n-1]>=90)&&(ss[n-1]<=140)&&(sz[n-1]>=60)&&(sz[n-1]<=90)){
       j++;
	   sz2[t]=j;
   }
   else{
      sz2[t]=j;
   }
   for(k=1;k<t+1;k++){
	   for(i=0;i<t+1-k;i++){
		   if(sz2[i]<sz2[i+1]){
		      e=sz2[i+1];
			  sz2[i+1]=sz2[i];
			  sz2[i]=e;
		   
		   
		   }
	   }
   }
  printf("%d",sz2[0]);

return 0;
}
int main(){
	int n,i,j;
	int a[100],b[100];
	int c=0,d=0,e=0,f=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]>59&&b[i]<=90){
				d=i;
				for(j=d+1;j<n;j++){
					if(a[j]>=90&&a[j]<=140&&b[j]>59&&b[j]<=90&&a[j-1]>=90&&a[j-1]<=140&&b[j-1]>59&&b[j-1]<=90){
						e=j;
					}else{
						break;
					}
				}
				f=e-d+1;
				if(f>c){
					c=f;
				}
					
			}
			
	}
	
	printf("%d",c);

	return 0;

}
int main()
{
    int n;
    int ss[100];
    int sz[100];
    int a=0;
    int e=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d%d",&ss[i],&sz[i]);
    }
    ss[n]=0;sz[n]=0;
    for(int i=0;i<n+1;i++){
        if((ss[i]>=90)&&(ss[i]<=140)&&(sz[i]>=60)&&(sz[i]<=90)){
            a++;
        }
        else{
            if(a>e){
                e=a;
           }
           a=0;
                    
                    
        }
    }
    printf("%d",e);
    return 0;
}
int main()
{
int n,i,j,k,p,q,e,y;
int sz[1000][1000];
int sz2[100000];
scanf("%d",&n);
for(i=1;i<=n;i++){for(j=1;j<=2;j++){scanf("%d",&sz[i][j]);}}
k=0;
for(y=1;y<=n;y++){if(sz[y][1]>=90&&sz[y][1]<=140&&sz[y][2]>=60&&sz[y][2]<=90){sz2[y]=k+1;k++;}else{sz2[y]=0;k=0;}}
for(q=1;q<=n-1;q++){if(sz2[q]>=sz2[q+1]){e=sz2[q+1];sz2[q+1]=sz2[q];sz2[q]=e;}}
printf("%d",sz2[n]);
return 0;
}
int main()
{
    int n,a[100],b[100],i=1,j=1,k=1,sum[100],max=0;
	memset (sum,0,sizeof(sum));
	cin >> n ;
	for (i = 1; i <= n; i++)
	{
		cin >> a[i] >> b[i];
	}
	for (j = 1; j <= n; j++)
    {
	if ( (a[j] >= 90) && (a[j] <= 140) && (b[j] >= 60) && (b[j] <= 90) )
		sum[k] ++;
	else 
		k++;
	}
	for (k = 1; k <= n; k++)
	{
		if (sum[k] >= max)
			max = sum[k] ;
	}
	cout << max << endl;
	return 0;
}
int main()
{
    int n,a,b,j=0,sum =0 ,r[100]={0},max=0;
	scanf("%d",&n);
	for(int i=0; i<n;i++)
	{
		scanf("%d%d",&a,&b);
		if( (a<=140&&a>=90) && (b<=90&&b>=60) )
			sum++;
		else if ( (a>=140||a<=90) || (b>=90||b<=60) )
		{
			r[j]=sum;
			j++;
			sum=0;
		}
		if(i==n-1) r[j+1]=sum;
	}

	for(int m=0;m<j+2;m++)
	{
		max=(max>r[m])?max:r[m];
	}

    printf("%d\n",max);
	
    return 0;
}
int m(int p,int q)
{int z;
z=(p>q)? p:q;
return z;
}
main()
{   
    int i,x,j,y,n,r;
    scanf("%d",&n);
    int a[n],t[n];
    for(i=1;i<=n;i++)
    {t[i-1]=0;
        scanf("%d %d",&x,&y);
        if(x>=90&&x<=140&&y<=90&&y>=60) a[i-1]=1;else a[i-1]=0;
    }
    for(i=1,j=0;i<=n;i++)
    {if(a[i-1]==1) t[j]++;else j++;
    }
    for(i=1,r=t[0];i<=n-1;i++)
    r=m(r,t[i]);
    printf("%d",r);

    return 0;
}
int main(int argc, char *argv[])
{
  int n, sys, dia, i, normal=0, max=0;
  /*n?????? sys?dia????????? i????? normal?????????? max????????*/
  scanf ("%d",&n);
  /*?????? ????????*/ 
  for (i=1;i<=n;i++){//????n? 
      scanf ("%d %d",&sys,&dia);//???? 
      if (sys>=90 && sys<=140 && dia>=60 && dia<=90)
         normal++; 
      else
         normal = 0;
      /*????????????? ?normal+1 ??normal??*/ 
      if (max<normal)
         max = normal;
      /*?normal?max????? ?normal???????max???? ???????????*/
      }
  
  printf ("%d",max);//???? 
  
  return 0;
}
int main(){
	int n,x,y;
	int i=1;
	int max=0;
	int time=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d %d\n",&x,&y);
		if(x>=90 && x<=140 && y>=60 && y<=90){
			time+=1;
			if(time>=max){
				max=time;
			}
		}else{
			time=0;
		}
	}
	printf("%d",max);
	return 0;
}
int main(int argc, char* argv[])
{ 
	int i,n,x[200];
	int t=0;
	int s=0;
	int max(int x,int y);
	scanf ("%d",&n);
	for (i=0;i<n;i++)
	{
	scanf ("%d %d",&x[(2*i)],&x[(2*i+1)]);
	}
    for (i=0;i<n;i++)
	{
		if (
			(x[(2*i)]<=140)
			&&(x[(2*i)]>=90)
			&&(x[(2*i+1)]<=90)
			&&(x[(2*i+1)]>=60)
			)
	   {
	    s=s+1;
		}
	    else 
		{
			t=max (t,s);
		    s=0;
		}
	
	}
	t=max (t,s);
	printf ("%d",t);
	return 0;
}
int max(int x,int y)
{
int z;
if (x>y) z=x;
else z=y;
return(z);
}
//????
int main()
{
    int a[100];
	int b[100];
	int h[100];
	int m,n,i,j;
	scanf("%d",&m);
	n=0;
	for(n=0;n<m;n++)
		scanf("%d %d",&a[n],&b[n]);
	i=0;
	j=0;
	n=0;
	for(n=0;n<m;n++)
	{
		h[n]=0;
	 for(j=i;j<m;j++)
	 {
		i=j+1;
		if(a[j]>=90&&a[j]<=140&&b[j]>=60&&b[j]<=90)
			h[n]++;
		else
			break;
	}
	}
	i=0;
	for(i=0;i<n;i++)
	{
		if(h[i]>h[0])
			h[0]=h[i];
	}
	printf("%d\n",h[0]);
	return 0;
}
int s[110];

int main(){
	int n,i,a,b,sum=0,c=0;
	cin>>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]){
			c++;
		}else 
			c=0;
		if (sum<c){
			sum=c;
		}
	}
	printf("%d\n",sum);
}
int main()
{
	int  n;int  a[100][2];
int  i=0;
int x=0;int c=0;
scanf("%d",&n);
for(i=0;i<n;i++){
for(int  j=0;j<2;j++)
            scanf("%d",&a[i][j]);
}
 
for(i=0;i<n;i++){
	if(90<=a[i][0]&&a[i][0]<=140&&60<=a[i][1]&&a[i][1]<=90){
   x++;
   if(x>c)  c=x;
	}
	else 
		x=0;
 }
printf("%d",c);
 return 0;
}
int c[100];
int main()
{
	int e,i,k,n,a[100],b[100];
	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))
		{
			for(k=i;k<n;k++)
			{
               if((a[k]>=90)&&(a[k]<=140)&&(b[k]>=60)&&(b[k]<=90))
			   {
				   c[i]=c[i]+1;
			   }
			   else
				   break;
			}
		}
	}
	
	for(i=0;i<n-1;i++)
	{
		if(c[i]>c[i+1])
		{
			e=c[i+1];
			c[i+1]=c[i];
			c[i]=e;
		}
	}
	printf("%d",c[n-1]);
	return 0;
}
int main()
{
	int a[100],b[100],c[100],n,s=0,i,j=0,m=0;
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	memset(c,0,sizeof(c));
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i]>>b[i];
		if((a[i]>=90)&&(a[i]<=140)&&(b[i]>=60)&&(b[i]<=90))
			c[j]++;
		else
			j++;
	}
	for(j=0;j<=n;j++)
	{
		m=(m>c[j])?m:c[j];
	}
	cout<<m<<endl;
	return 0;
}
int main()
{
	int n,i,s,max;
	int a[100];
	int b[100];
	int c[100];
	
	scanf("%d",&n);
	max=0;
	s=0;
	c[0]=0;
	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[s]++;
		}else{
			if(c[s]>max){
				max=c[s];
			}
			s++;
			c[s]=0;
		}
		if(c[s]>max){
				max=c[s];
			}
	}
	printf("%d\n",max);
	return 0;
}
int main()
{
	int n;
	int k = 0;
	int max = 0;
	int a;
	int b;
    scanf("%d",&n);
	while(n != 0)
	{
		scanf("%d",&a);
		scanf("%d",&b);
		if (90 <= a && a <= 140 && 60 <= b && b<= 90)
			k++;
		else
			k = 0;
			
		if(max < k)
			max = k;
			
	   n--;
	}
	printf("%d",max);
	
   return 0;
}
int main()
{
 int n;
 cin>>n;
 int max=0;
 int t=0;
 int a,b;
 for(int i=1;i<=n;i++)
 {
  cin>>a>>b;
  if(a>=90&&a<=140&&b>=60&&b<=90)
   t++;
  else if(t!=0)
   {max=t>max?t:max;t=0;}
  max=t>max?t:max;
 }
 cout<<max;
 return 0;
}
int main(){
	int n,k[101],i,q[101],j=0,m=0;
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d %d",&k[i],&q[i]);
	}
	for(i=0;i<n;i++)
	{
		if(k[i]<=140&&k[i]>=90&&q[i]<=90&&q[i]>=60)
		{
			j++;
		}
		else
		{
			if(j>m)
			{
				m=j;
				j=0;
			}
			else
			{
				j=0;
			}
		}
	}
	if(j>m)
			{
			printf("%d",j);
			}
			else
			{
printf("%d",m);
			}
	return 0;
}
int main()
{
	int t = 0, i, n, shou, shu, health;
	int max = 0;
	int bp[100 + 10] = {0};
	cin >> n;
	for (i = 0; i < n; i ++)
	{
		cin >> shou >> shu;
		if (90 <= shou && shou <= 140 && 60 <= shu && shu <= 90)
			bp[i] = 1;
	}
	cout << endl;
	for (i = 0; i < n; i ++)
	{
		if (bp[i] == 0)
		{max = max > t ? max : t; t = 0;}
		else t ++;
	}
	
	max = max > t ? max : t;
	cout << max << endl;
}
int main()
{
	int n,x,y,i,j,a=0,b[100];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>x>>y;
		if(x>=90&&x<=140&&y>=60&&y<=90) {a=a+1; b[i]=a;}
		else {b[i]=a; a=0;}
	}
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{if(b[i]<b[j]) swap(b[i],b[j]);}
	cout<<b[0]<<endl;
	return 0;
}
/*
 * 4.cpp
 *????????????????
 *  Created on: 2012-10-26
 *      Author: ???
 */

int main()
{
	int n,i,a[101],b[101],h=0,t=0,m[101];       //????
	cin>>n;
	for(i=1;i<=n;i++)                           //??
	{
		cin>>a[i]>>b[i];                     //????
		if(90<=a[i]&&a[i]<=140&&60<=b[i]&&b[i]<=90)    //??????
		{
			h++;                                    //????1
			m[i]=h;               //m???????
		}
		else                          // ???????
		{
			m[i]=h;               //????????m???????
			h=0;                 //????????
		}
	}
	t=m[1];                             //t?????m1
	for(i=1;i<=n;i++)                                 
	{
		if(t<=m[i])                                
		{
			t=m[i];
		}                         //??t????????t???????
    }
	cout<<t;
	return 0;
}
int main(){
	int n,gao[100],di[100],xiaoshi=0,max=0,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&gao[i],&di[i]);
	}
	for(i=0;i<n;i++){
		if(gao[i]>=90&&gao[i]<=140&&di[i]>=60&&di[i]<=90){
			xiaoshi++;
			if(gao[i+1]>=90&&gao[i+1]<=140&&di[i+1]>=60&&di[i+1]<=90){
				continue;
			}else{
				if(xiaoshi>max){
					max=xiaoshi;
				}
				xiaoshi=0;
			}
		}
	}
	printf("%d",max);
	return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	int a[100]={0};
	int b,c;
	int i,j=0;
	for(i=0;i<n;i++){
		scanf("%d%d",&b,&c);
		if(b<=140&&b>=90&&c<=90&&c>=60){
			a[j]++;
		}
		else{
			j++;
		}
	}
	b=a[0];
	for(i=1;i<=j;i++){
		if(a[i]>b){
			b=a[i];
		}
	}
	printf("%d",b);
	return 0;
}
int main(){
	int S[100][2],n,i,j,k,K;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		for(j=0;j<2;j++)
		scanf("%d",&S[i][j]);
		k=0;
		K=0;
		for(i=0;i<n;i++){
			if((90<=S[i][0])&&(S[i][0]<=140)&&(60<=S[i][1])&&(S[i][1]<=90))
				k++;
			else {
				if(k>K){
					K=k;
				    k=0;
				}
				else k=0;
			}
		}
		if(k>K)
			K=k;
		printf("%d",K);
		return 0;
}
int main()
{
	int n,a[100],b[100],c[100]={0},t,p,q;
	cin>>n;
	if (n==1)
	{	cin>>p>>q;
	if (p<=140 && p>=90 && q>=60 &&q<=90)
		cout<<"1"<<endl;
	else cout<<"0"<<endl;
	}
	else 
	{
	for (int i=0;i<n;i++)
	{
		cin>>a[i]>>b[i];
	}
	for (int j=1;j<=n;j++)
	{
		if (a[j-1]<=140 && a[j-1]>=90 && b[j-1]>=60 &&b[j-1]<=90)
			c[j]=c[j-1]+1;
	}
	for (int k=0;k<n;k++)
	{
		if (c[k+1]<c[k])
		{t=c[k+1];c[k+1]=c[k];c[k]=t;}
	}
    cout<<c[n]<<endl;
	return 0;
}
}
int main(){
	int a,b,c,y[100],i,j=1;
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d%d",&b,&c);
		if(b>140||b<90||c>90||c<60){
			y[j]=i+1;
			j++;
		}
	}
	y[0]=0;
	y[j]=a+1;
	j++;
	a=y[1]-y[0];
	for(i=1;i<j-1;i++){
		if((y[i+1]-y[i])>a){
			a=y[i+1]-y[i];
		}
	}
	a=a-1;
	printf("%d",a);
	return 0;
}
int main(){
    int a[100],b[100],c[100]={0},d[100]={0};
    int i,n,k,result=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(90<=a[i]&&a[i]<=140&&60<=b[i]&&b[i]<=90){
            c[i]=1;
        }
    }
    for(k=0;k<n;k++){
        for(i=0;i<n;i++){
            if(c[i]==1){
                d[k]+=1;
                c[i]=0;
                if(c[i+1]==0){
                    break;
                }
            }
        }
    }
    for(i=0;i<k;i++){
        if(d[i]>=max)
        max=d[i];
    }
    printf("%d",max);
    return 0;
}
//********************************
//*???????.cpp   **
//*?????? 1200012768 **
//*???2012.10.12  **
//********************************
int main()               
{
     int n, h = 0, t = 0;  //????????????????????? 
//   cout << "????????n?";
     cin >> n;
     int sbp[n], dbp[n];  //???n????????n??????? 
     for (int i = 0; i < n; i++)
         cin >> sbp[i] >> dbp[i]; //????????? 
     for (int i = 0; i < n; i++)
     {
         if (sbp[i] >= 90 && sbp[i] <= 140
             && dbp[i] >=60 && dbp[i] <= 90)
         {
            h += 1;  //???????????? 1 
            t =(t > h ? t : h);  //?????? 
         } 
         else
            h = 0;    //?????????????????????????? 
     }
//   cout << "?????????????";
     cout << t << endl;
     return 0;
}
int main()
{
    int n,i,j=0,max;
    int bp[N][2];
    int state[N]={0};
    int hou[N]={0};
    scanf("%d",&n);
    for(i=0;i<=n-1;i++){
        scanf("%d%d",&bp[i][0],&bp[i][1]);
    }
    for(i=0;i<=n-1;i++){
        if(((bp[i][0]>=90)&&(bp[i][0]<=140))&&((bp[i][1]>=60)&&(bp[i][1]<=90))){
          state[i]=1;
        }          //????????????????1
    }
    state[n]=0;
    for(i=0;i<=n;i++){
        if(state[i]==1){
           j++; 
        }
        else{
            hou[i]=j;
            j=0;
        }
    }             //?hou[i]??????????????
    max=hou[0];
    for(i=0;i<=n;i++){
        if(max<hou[i]){
            max=hou[i];
        }
    }            //?hou[i]???
    printf("%d",max);
    return 0;
}
int main(){
	int n,i,l[100],r[100],wa[100]={0},z=0,max;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&l[i],&r[i]);
	}
	for(i=0;i<n;i++){
		if(l[i]>=90&&l[i]<=140&&r[i]>=60&&r[i]<=90){
			wa[z]++;
		}else{
			z++;
		}
	}
	if(l[n-1]>=90&&l[n-1]<=140&&r[n-1]>=60&&r[n-1]<=90){
		z++;
	}
	for(i=0;i<z;i++){
		if(i==0||max<wa[i]){
			max=wa[i];
		}
	}
	printf("%d\n",max);
	return 0;
}
int main()
{
   int n,i,j,a=0;
   int s[200][2],u[100]={0};
   scanf("%d\n",&n);
   for(i=0;i<n;i++)
      {
         for(j=0;j<2;j++)
            {
                scanf("%d",&s[i][j]);
             }
       }
   for(i=0;i<n+1;i++)
      {
          if((s[i][0]>=90)&&(s[i][0]<=140)&&(s[i][1]>=60)&&(s[i][1]<=90))
             u[a]++;
          else a++;
       }
   int b=u[0];
   for(i=0;i<a;i++)
       {
         if(b<u[i])
         b=u[i];
        }
    printf("%d\n",b);
    return 0;
}
int main()
{
	int n,i,e,k,d,f,hours;
	int sz[100][2];
	int a[100]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		for(e=0;e<2;e++)
		{
			scanf("%d",&sz[i][e]);
		}
	}
	hours=0;
	for(i=0;i<n;i++)
	{
		if(sz[i][0]>=90&&sz[i][0]<=140&&sz[i][1]>=60&&sz[i][1]<=90)
		{
			a[hours]++;
		}
		else
		{
			hours++;
		}
	}
    for(k=1;k<=hours;k++)
	{
		for(d=0;d<=hours-k;d++)
		{
			if(a[d]>a[d+1])
			{
				f=a[d+1];
				a[d+1]=a[d];
				a[d]=f;
			}
		}
	}
	printf("%d",a[hours]);
	return 0;

}
int main()
{
	int normal(int x,int y);
	int n,i,c=0,t=0,a[100],b[100];
	scanf("%d",&n);
    for(i=0;i<=n-1;i++){
	scanf("%d %d",&a[i],&b[i]);
		if(normal(a[i],b[i])==1){
		t+=1;
		    if(t>c){
	    	c=t;
				}
			}
		if(normal(a[i],b[i])==0){
			t=0;
		}
	}
	printf("%d\n",c);
	return 0;
}
int normal(int x,int y){
    int z;
	if(x>=90&&x<=140&&y>=60&&y<=90)
		z=1;
	else z=0;
	return (z);
}
int main()
{
	int i,n,a[100],b[100],sum1=0,sum2=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)
			sum1++;
		else
		{
			if(sum1>sum2)
				sum2=sum1;
			sum1=0;
		}
		if(i==n-1&&sum1>sum2)
                sum2=sum1;
	}
	printf("%d",sum2);
	return 0;
}
int main()
{
    int n,i,j=0,max;
    int bp[N][2];
    int sz[N];
    int hou[N];
    scanf("%d",&n);
    for(i=0;i<=n-1;i++)
    {
        scanf("%d%d",&bp[i][0],&bp[i][1]);
    }
    for(i=0;i<=n-1;i++)
    {
        sz[i]=0;
        hou[i]=0;
    }
    for(i=0;i<=n-1;i++)
    {
        if(((bp[i][0]>=90)&&(bp[i][0]<=140))&&((bp[i][1]>=60)&&(bp[i][1]<=90)))
        {
          sz[i]=1;
        }         
    
    }
    sz[n]=0;
    for(i=0;i<=n;i++)
    {
        if(sz[i]==1)
        {
           j++; 
        }
        else
        {
            hou[i]=j;
            j=0;
        }
    }             
    max=hou[0];
    for(i=0;i<=n;i++)
    {
        if(max<hou[i])
        {
            max=hou[i];
        }
    }            
    printf("%d",max);
    return 0;
    
}
/*
 * zhengchangxueya.cpp
 *
 *  Created on: 2012-10-20
 *      Author: 1200012791??
 *      ????????????????????????90 - 140????????60 - 90????????????????????????????????????????????????
 */
int main(){
	int a=0,b=0,n=0,i=0,k=0,s=0; //??7???????????0
	cin>>n; //??n
	int c[n+1]; //??1???????????
	for(i=0;i<n;i++){ //????
		cin>>a>>b; //?????????
		c[i]=0; //c[i]???0
		if (a>=90&&a<=140&&b>=60&&b<=90) //??????
			c[k]=c[k]+1; //???????c?1
		else k=k+1; //?????c????????
	}
	c[n]=0; //?c[n+1]???????????
	for(i=0;i<=k;i++){ //????
		if (s<c[i]) s=c[i]; //????????????????????????
	}
	cout<<s; //?????????
	return 0;
}
int main()
{
    int n, a, b, t = 0, i = 1, h = 0;
    cin >> n;
    do
    {
        cin >> a >> b;
        if(a >= 90 && a <= 140 && b >= 60 && b <= 90)
            h = max(i - t, h);
        else
            t = i;
        i++;
    }while(i <= n);
    cout << h << endl;
    return 0;
}
//????
int main()
{
    int n,h=0,hmax=0;
    cin>>n;
    int a[100][3];//a?????
    for(int i=1;i<=n;i++)
    {
        cin>>a[i][1]>>a[i][2];
        if(90<=a[i][1]&&a[i][1]<=140&&60<=a[i][2]&&a[i][2]<=90)
            h++;
        else h=0;
        hmax=h>=hmax?h:hmax;
    }
    cout<<hmax;
}
int main()
{
	int n,i=0,a=0,d=0;
	struct xy{
		int ssy,szy;
	}xy[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&(xy[i].ssy),&(xy[i].szy));
	}
	for(i=0;i<n;i++){
		if((xy[i].ssy>=90)&&(xy[i].ssy<=140)&&(xy[i].szy<=90)&&(xy[i].szy>=60)){
			a=a+1;
		}else{
			a=0;
		}
		if(a>d){
			d=a;
		}
	}
	printf("%d",d);
	return 0;
}
/*
 * pressure.cpp
 *
 *  Created on: 2012-10-17
 *      Author: Justin
 */
int main(){
	int p1,p2,hour,hourmax,n;
	hour=0;
	hourmax=0;
	cin>>n;
	while(n>0){
		cin>>p1>>p2;
		if(p1<=140 && p1>=90 && p2<=90 && p2>=60)
			{hour=hour+1;
			n=n-1;
			}
		else
		{hourmax=max(hour,hourmax);
		hour=0;
		n=n-1;
		}
	}
	cout<<max(hour,hourmax);
	return 0;
}
int main(int argc, char* argv[])
{
	int n;
	int a,b;
	int sum=0;
	int x=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		scanf("%d %d",&a,&b);
		if(90<=a&&a<=140&&60<=b&&b<=90)
		{
			sum++;
		}
		else
		{
			sum=0;
		}
		if(sum>=x)
		{
			x=sum;
		}
	}
	printf("%d",x);
	return 0;
}
int zhengchang(int i,int j){
	if((i>=90&&i<=140)&&(j>=60&&j<=90)){
		return 1;
	}
	return 0;
}
int main(){
	int n,i,a[100],b[100],k,t[100]={0},m=0,j,max;
	scanf("%d",&n);
	for(k=0;k<n;k++){
		scanf("%d%d",&a[k],&b[k]);
	}
	for(i=0;i<n;i++){
		if(zhengchang(a[i],b[i])){
			for(j=i;zhengchang(a[j],b[j]);j++){
				t[m]++;
			}
			i=j-1;
			m++;
		}
	}
	max=t[0];
	for(i=1;i<m;i++){
		if(t[i]>max){
			max=t[i];
		}
	}
	printf("%d",max);
	return 0;
}
int main()
{
	int n,i,j,a,b,p,q; //????n????i?j???a???b???????p???????q
	cin >> n; //????
//	p = 0; //p??????0
	q = 0; //q??????0
	j = 0; //j??????0
	for (i = 1;i <= n;i++) //??n?
	{
		cin >> a >> b; //??a?b
		if (a >= 90 && a <= 140 && b >= 60 && b <= 90) //??????
		{
			j = j+1; //???+1
		}
		else
		{
			j = 0;
		}
//		p = j;
			if (j > q)
			{
				q=j;
			}		
	}
	cout << q << endl;
	cin.get();
    cin.get(); //????
	return 0;
}