semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//
//  main.cpp
//  ????
//
//  Created by mac on 12-10-28.
//  Copyright (c) 2012? mac. All rights reserved.
//

int main(){
    int n,i,a[1000],b[1000],c[1000]={0};//???????????
    cin>>n;//????????
    for(i=1;i<=n;i++)
        cin>>a[i]>>b[i]; //????????
    for(i=1;i<=n;i++){
        if(90<=a[i]&&a[i]<=140&&60<=b[i]&&b[i]<=90)//????
            c[i]=c[i-1]+1;
            else
                c[i]=0;
    }
    int max=0;
    for(i=1;i<=n;i++)
    {
        if(c[i]>max)
            max=c[i];
        else
            max=max;
    }
    cout<<max<<endl;//?????
    return 0;//????
}
int main(){
	int n,h[100],l[100],hour[101]={0},i,max=0;
	scanf("%d\n",&n);
	for(i=1;i<=n;i++){
		scanf("%d %d\n",&h[i],&l[i]);
		if(h[i]>=90&&h[i]<=140&&l[i]>=60&&l[i]<=90){hour[i]=hour[i-1]+1;}
		if(hour[i]>=max){max=hour[i];}}
	printf("%d",max);
	return 0;
}
void arrange(int *arrangearry,int nt,int kd_order)
{
	int flagi,flagj,temporary;
	if(kd_order==1)
	{
		for(flagi=nt-1;flagi>0;flagi--)
		{
			for(flagj=0;flagj<flagi;flagj++)
			{
				if(arrangearry[flagj]<arrangearry[flagj+1])
				{
					temporary=arrangearry[flagj];
					arrangearry[flagj]=arrangearry[flagj+1];
					arrangearry[flagj+1]=temporary;
				}
			}
		}
	}
}
int main()
{
	int n,ss[100],sz[100],i,j=0,h[100]={0};
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>ss[i]>>sz[i];
		if(ss[i]>=90&&ss[i]<=140&&sz[i]>=60&&sz[i]<=90) h[j]++;
		else j++;
	}
	arrange(h,100,1);
	cout<<h[0];
	return 0;
}
int main()
{
	int n,a[100],b[100],c[100],i,k;
	int d=0;
	int e=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
		scanf("%d %d",&(a[i]),&(b[i]));
	}
	for(i=0;i<n-1;i++){
		if((a[i]>=90&&a[i]<=140)&&(b[i]>=60&&b[i]<=90)){
			d++;
		}else{
			c[e]=d;
			e++;
			d=0;
		}
	}
	if((a[n-1]>=90&&a[n-1]<=140)&&(b[n-1]>=60&&b[n-1]<=90)){
		d++;
		c[e]=d;
		e++;
	}else{
        c[e]=d;
		e++;
	}
	for(i=1;i<=e;i++){
		for(k=0;k<e-i;k++){
			if(c[k]<c[k+1]){
				d=c[k+1];
                c[k+1]=c[k];
				c[k]=d;
			}
		}
	}
	printf("%d",c[0]);
	return 0;
}
int main()
{
	int n,pressure[100][2],time[100],j=0,maxtime;
	cin>>n;
	for(int k=0;k<100;k++)
		time[k]=0;
	for(int i=0;i<n;i++)
		{	
			cin>>pressure[i][0]>>pressure[i][1];
			    if((pressure[i][0]>=90)&&(pressure[i][0]<=140)&&(pressure[i][1]<=90)&&(pressure[i][1]>=60))
					time[j]++;
				else
					j++;
	    }
	maxtime=time[0];
	for(int m=0;m<100;m++)
	{
		if(maxtime<time[m])
			maxtime=time[m];
	}       
	cout<<maxtime<<endl;
	return 0;
}
int main(){
int a,j,i,m=0,n=0;
scanf("%d",&a);
int x[a][2],c=0;
for(i=0;i<a;i++){
      for(j=0;j<2;j++){
      scanf("%d",&x[i][j]);
      }
      if(x[i][0]>=90&&x[i][0]<=140&&x[i][1]>=60&&x[i][1]<=90){
         m++;
         if(m>c&&i==a-1){
                         c=m;
                         break;
                         }
      }else{
               if(c<m){
                 c=m;
               }  
             m=0;
           }
}
printf("%d",c);
return 0;
}
int main()
{
	int n, a1[100], a2[100];
	int i, j, t, l, temp = 0;

	cin >> n;
	for (i = 0; i < n; i++)
		cin >> a1[i] >> a2[i];
	t = 0;
	l = 0;
	for(j = 0; j < n; j++)
	{
		if (a1[j] <= 140 && a1[j] >= 90 && a2[j] <= 90 && a2[j] >= 60)
		{
			t++;
			temp = t;
		}
		else 
		{
			if (t > l)
				l = t;
			t = 0;
		}
	}
	if (temp > l)
		l = temp;
	cout << l << endl;
	return 0;
}
int main(){
	int i,n,gy[100],dy[100],zc[100],e,s,k,max=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
         scanf("%d%d",&gy[i],&dy[i]);
		 if(gy[i]>=90&&gy[i]<=140&&dy[i]>=60&&dy[i]<=90){
			 zc[i]=1;
		 }else{zc[i]=0;}
	}
    for(i=0;i<n;i++){
        if((i==0||zc[i-1]==0)&&zc[i]==1){e=i;}
		if((i==n-1||zc[i+1]==0)&&zc[i]==1){s=i;}
        if(s>=e){
			k=s-e+1;
			if(k>max){max=k;}
		}
	}
	printf("%d",max);
	return 0;
}
int main()
{
	int n,i,j,r;
	int t=0;
	int gy[100];
	int dy[100];
	int tx[100];
	scanf ("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&gy[i],&dy[i]);
		if(gy[i]>=90&&gy[i]<=140&&dy[i]>=60&&dy[i]<=90){
			t++;
			tx[i]=t;
		}
		else{
			t=0;
			tx[i]=t;
		}
	}
	for(j=n-1;j>0;j--){
		for(r=0;r<j;r++){
			if(tx[r]<tx[r+1]){
				int tmp;
				tmp=tx[r+1];
				tx[r+1]=tx[r];
				tx[r]=tmp;
			}
		}
	}
	printf("%d",tx[0]);
return 0;
}
int main()
{
	int n,i,j,a[100][2],b[100]={0},k[100]={0},max=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
		scanf("%d%d",&a[i][1],&a[i][2]);
	for(i=1;i<=n;i++)
	{
		if(a[i][1]<=140&&a[i][1]>=90&&a[i][2]<=90&&a[i][2]>=60)
			b[i]=1;
		else b[i]=0;
	}
	j=1;
	for(i=1;i<n;i++)
	{
		if(b[i]==1)
		{
			k[j]+=1;
			if(i==(n-1)&&b[n]==1)
				k[j]+=1;
		}
		if(b[i]==0)
			j++;
	}
	for(j=1;j<=100;j++)
	{
		if(k[j]>=max)
			max=k[j];
	}
	if(n==1)
		if(b[1]==1)
			printf("1");
		else printf("0");
	else
	printf("%d",max);
	return 0;
}
int main(int argc, char* argv[])
{
	int n,sz[100][2],s[100],i,j=0,k=1,b=0,a[50];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d %d",&sz[i][0],&sz[i][1]);
		if(sz[i][0]>=90&&sz[i][0]<=140&&sz[i][1]>=60&&sz[i][1]<=90)
		{
			s[j]=i;
			j++;
		}
	}
	if(j==0)
		printf("0\n");
	if(j!=0)
	{
	s[j]=-1;
	for(i=0;i<j;i++)
	{
		if(s[i+1]==s[i]+1)
		{
			k++;
		}
		if(s[i+1]!=s[i]+1)
		{
			a[b]=k;
			b++;
			k=1;
		}
	}
	for(i=0;i<b-1;i++)
	{
		if(a[i]>a[i+1])
		{
			k=a[i+1];
			a[i+1]=a[i];
			a[i]=k;
		}
	}
	printf("%d\n",a[b-1]);
	}
	return 0;

}
int main()
{
	int n,i,h,l,a=0,b,x=0,e,k;
	int s[100]={0};
	scanf("%d\n",&n);
	for (i=0;i<n;i++)
	{
			scanf("%d%d\n",&h,&l);
		    if (h>=90&&h<=140&&l>=60&&l<=90)
			{
				a++;
			}
			else{
				a=0;
			}
			s[x]=a;
			x++;
	}
    for(k=1;k<100;k++)
	{
		for (x=0;x<100-k;x++)
		{
			if (s[x]>s[x+1])
			{
    			e=s[x];
				s[x]=s[x+1];
				s[x+1]=e;
			}
		}
	}

	printf("%d",s[99]);
    return(0);
}
int main(){
	int n,i,a[100],b[100],c[100],j=0,d;
	scanf("%d",&n);
	for(i=0;i<n;i++){
	c[i]=0;
	scanf("%d%d",&a[i],&b[i]);
	}
	i=0;
	for(i=i;i<n;i++){
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
			c[j]++;
		else
			j++;
	}
	for(i=0;i<n-1;i++){
		if(c[i]>c[i+1]){
		d=c[i];c[i]=c[i+1];c[i+1]=d;
		}
	}
	printf("%d",c[n-1]);
		return 0;
	}
int main()
{
	int i,k,x=0,n,b[100]={0},t[100]={0};
	scanf("%d",&n);
	struct point
	{
		int s;
		int z;
	}
	a[100];
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&a[i].s,&a[i].z);
		if((a[i].s>90||a[i].s==90)&&(a[i].s<140||a[i].s==140)&&(a[i].z>60||a[i].z==60)&&(a[i].z<90||a[i].z==90))
		{
			b[i]++;
		}
	}
	for(i=0;i<n;i++)
	{
		if(b[i]==1)
		{
			t[x]++;
			for(k=1;;k++)
			{
				if(b[i+k]==1)
				{
					t[x]++;
				}
				if(b[i+k]==0||i+k==n-1||i+k>n-1)
				{
					x++;
					break;
				}
			}
		}
	}
	int max=0;
	for(i=0;i<x;i++)
	{
		if(t[max]<t[i])
		{
			max=i;
		}
	}
	printf("%d",t[max]);
	return 0;
}
int main() {
	int  a[101],b[101],c[101],n,d,e,f,g,h;
	scanf("%d",&n);
	f=0;
	e=1;
	for (d=1;d<=n;d++){
		scanf("%d %d",&a[d],&b[d]);
	}
	for(d=1;d<=101;d++){
		c[d]=0;
	}
	for (d=1;d<=n;d++){
		if(a[d]>=90&&a[d]<=140&&b[d]>=60&&b[d]<=90) {
			f++;
		    c[e]=f;
		}
		else {  
				e++;
				f=0;
		
		}
	}
		for(g=e-1;g>=1;g--){
			if (c[g]<c[g+1]){
				h=c[g+1];
				c[g]=h;
			}
		}
		printf("%d\n",c[1]);
		return 0;

}
int main()
{
	int n,i,a[101],b[101],t=0,temp=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))
		{
			temp=temp+1;

		if(temp>t)
			t=temp;
		}
		else
			temp=0;
	}
	cout<<t<<endl;
	return 0;
}
int main(){
	struct suoyou{
		int qian;
		int hou;
	}suoyous[100];
	int i,k;
	int n,m=0;
	int s=0,e=0;
	int hao[100];
	for(i=0;i<100;i++){
		hao[i]=0;
	}
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&suoyous[i].qian,&suoyous[i].hou);
	}
	for(i=0;i<n;i++){
		if(suoyous[i].qian>=90&&suoyous[i].qian<=140&&suoyous[i].hou>=60&&suoyous[i].hou<=90){
			s=i;
			e=i+1;
			while(suoyous[e].qian>=90&&suoyous[e].qian<=140&&suoyous[e].hou>=60&&suoyous[e].hou<=90){
				e+=1;
			}
		}
		hao[m]=e-s;
		m++;
	}
	for(i=1;i<=m;i++){
		for(k=0;k<m-i;k++){
			if(hao[k]<hao[k+1]){
				e=hao[k];
				hao[k]=hao[k+1];
				hao[k+1]=e;
			}
		}
	}
	printf("%d",hao[0]);
	return 0;
}
int main(){
    int n,k,m,g;
    int a[105],b[105];
    int e[105];
    int normal=0;
    scanf("%d",&n);
    int i,j=0;

    for(i=0;i<n;i++){
        scanf("%d %d",&a[i],&b[i]);
        }
    if(n==1){
        if(a[0]>=90&&a[0]<=140&&b[0]>=60&&b[0]<=90){
           printf("1");
           return 0;
           }else{
           printf("0");
           return 0;
           }
    }

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




    for(k=1;k<=j;k++){
        for(i=0;i<j+1-k;i++){
            if(e[i]>e[i+1]){
                m=e[i+1];
                e[i+1]=e[i];
                e[i]=m;
                }
        }
    }
    if(e[j]==0)
    {
        for(i=0;i<n;i++)
        {
            if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
            {
                printf("1");
                return 0;
            }
        }
        printf("0");
        return 0;
    }
    printf("%d",e[j]);
    return 0;

}
int main()
{
    int n,i,k=0,j=0,MAX=0;
    int ss[100],sz[100],zc[100];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d %d",&(ss[i]),&(sz[i]));
    }
    for(i=0;i<n;i++){
        if((ss[i]>=90)&&(ss[i]<=140)&&(sz[i]>=60)&&(sz[i]<=90)){
            k++;;
        }else{
            zc[j]=k;
            j++;
            k=0;
        }
    }
    zc[j]=k;
    for(i=0;i<j+1;i++){
        if(MAX<zc[i]){
            MAX=zc[i];
        }
    }
    printf("%d",MAX);
	return 0;
}
int main()
{
	int n,a,b,i,j=0,k=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d %d",&a,&b);
		if((a>=90)&&(a<=140)&&(b>=60)&&(b<=90))
		{
			j++;
		}
		else 
		{
			k=(k>j)?k:j;j=0;
		}
	}
	k=(k>j)?k:j;
	printf("%d",k);
	return 0;
}
int main(){
    int n,P,p,x,i,M,m;
    M=0;
    x=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        scanf("%d%d",&P,&p);
        if(P>=90&&P<=140&&p>=60&&p<=90){
                   x=x+1;    m=x;                 }                  
        else{      
                   m=x;
                   x=0;}
        if(m>M){M=m;      }
}
    printf("%d",M);   
    return 0;
    }
int main(){
	int j,n,i,zu[100]={0},su[2][100],tu[100]={0};
 scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&su[0][i],&su[1][i]);
if(su[0][i]<=140 && su[0][i]>=90 && su[1][i]>=60 && su[1][i]<=90)
zu[i]=1;
}
for(i=0;i<n;i++)
for(j=i;j<n;j++){
if(zu[j]==1)
tu[i]++;
else
break;}
for(i=0;i<n;i++)
if(tu[i]>tu[0])
tu[0]=tu[i];
printf("%d",tu[0]);
return 0;
}
int main()
{
int n,i,c=0,d[100],a,b,max=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(a>=90&&a<=140&&b>=60&&b<=90){
c++;
d[i]=c;
}else{
d[i]=c;
c=0;
}
}
for(i=0;i<n;i++){
if(max<d[i]){max=d[i];}
}
printf("%d",max);
return 0;
}
int main(int argc, char* argv[])
{
	int x,y,i,j=0,max=0,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
	scanf("%d %d",&x,&y);
	if(x<=140&&x>=90&&y<=90&&y>=60){
	j=j+1;
	}else{
		if(j>max){
			max=j;}
	j=0;
	}
	}
	if(j>max){
	printf("%d",j);
	}
	else{
		printf("%d",max);
	}
	return 0;
}
int main()
{
	int n,a[1000],b[1000],i,p,c[1000],t;
	p=0;t=0;c[0]=0;
	scanf("%d\n",&n);
	for(i=0;i<n-1;i++){
		scanf("%d%d\n",&a[i],&b[i]);}
	scanf("%d%d",&a[n-1],&b[n-1]);
	for(i=0;i<n;i++){
        if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
			p=p+1;
		else {c[t]=p;p=0;t++;}}
	
	for(i=0;i<=t;i++){
		if(c[i]>p)p=c[i];}
	printf("%d\n",p);}
int main(){
	int n,i,j=0,a[100],b[100],s=0,c[100]={0},e;
	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&&i!=n-1){
			s++;
		}
		else if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90&&i==n-1){
			s++;
			c[j]=s;
		}
		else{
			c[j]=s;
			s=0;
			j++;
		}
	}
	for(i=1;i<=n;i++){
		for(j=0;j<n-i;j++){
			if(c[j]<c[j+1]){
				e=c[j];
				c[j]=c[j+1];
				c[j+1]=e;
			}
		}
	}
	printf("%d",c[0]);
	return 0;
}
int main ( )
{
	int n, i, j = 0, xie[100][3], time[100] = {0}, max;
	cin >> n;
	for(i = 0;i < n;i++)
	{
		cin >> xie[i][0] >> xie[i][1];
		if(xie[i][0]>=90 && xie[i][0]<=140 && xie[i][1]>=60 && xie[i][1]<=90)
			xie[i][2] = 1;
		else xie[i][2] = 0;
	}
	for(i = 0;i < n;i++)
	{
		if(xie[i][2] == 1)
			time[j]++;
		else
		{
			j++;
		}
	}
	max = time[0];
	for(i = 0;i < n;i++)
	{
		if(time[i] > max)
			max = time[i];
	}
	cout << max <<endl;
	return 0;
}
int main()
{
	int n,i=0,j=0,a,b,k=0;
	scanf("%d",&n);
		while(i<n)
		{   i++;
			scanf("%d %d",&a,&b);
			if(90<=a&&a<=140&&60<=b&&b<=90)
			{
				j++;
			}
			else
			{
				break;
			}
	     }
		while(i<n)
		{
	         while(i<n)
             {    i++;
			      scanf("%d %d",&a,&b);
			      if((90<=a)&&(a<=140)&&(60<=b)&&(b<=90))
			        {
				     k++;
			        }
			      else
			        {
				      break;
			        }
	         }
             if(k>j)
				      {
						  j=k;
					  }
				      k=0;
		}
printf("%d",j);
	return 0;
}
int main(){
	int a,b,n,i,x=0,m=0;
	scanf("%d",&n);
    if(n==1){
		scanf("%d %d",&a,&b);
		if((a>=90)&&(a<=140)&&(b>=60)&&(b<=90)){
			printf("1");
		}else{
			printf("0");
		}
	}
    if(n!=1){
	for(i=0;i<n;i++){
		scanf("%d %d",&a,&b);
		   if((a>=90)&&(a<=140)&&(b>=60)&&(b<=90)){
			x++;
		   }else{
			   if(x>m){
				   m=x;
			   }
			   x=0;
		 }
	}
	if(x>m){
		m=x;
	}
	printf("%d",m);
	}
	return 0;
}
int main(){
    int n,i,a,b,c,s=0,t=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
      scanf("%d %d",&a,&b);
      if( (a>=90&&a<=140)&&(b>=60&&b<=90) ){
        t++;
        c=1;
      }
      else if(!( (a>=90&&a<=140)&&(b>=60&&b<=90) )){
        t=0;
      }
      if(t>s){s=t;}
    }
    printf("%d",s);

    return 0;
}
int main()
{
	int n,xy[100][2],i,j,k,t;
	int xs[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&xy[i][0]);
		scanf("%d",&xy[i][1]);
	}
	for(k=0;k<100;k++)
	{
		xs[k]=0;
	}
	if(xy[0][0]>=90&&xy[0][0]<=140&&xy[0][1]>=60&&xy[0][1]<=90)
	{
		xs[0]=1;
	}
	for(i=1;i<n;i++)
	{
		if(xy[i][0]>=90&&xy[i][0]<=140&&xy[i][1]>=60&&xy[i][1]<=90)
		{
			if(xs[i-1]+1>xs[i])
			{
				xs[i]=xs[i-1]+1;
			}
		}
	}
	for(j=n-1;j>0;j--)
	{
		for(i=0;i<j;i++)
		{
			if(xs[i]>xs[i+1])
			{
				t=xs[i];
				xs[i]=xs[i+1];
				xs[i+1]=t;
			}
		}
	}
	printf("%d\n",xs[n-1]);
	return 0;
}
int main()
{
   int n,i,j,a[200],c[200],d,e=0;
   for(i=0;i<=200;i++)
   {
     c[i]=0;
   }
   struct b
   {
       int c,d;
   }b[200];
   scanf("%d\n",&n);
   for(i=0;i<n;i++)
   {
      scanf("%d %d",&b[i].c,&b[i].d);
   }
   for(i=0;i<n;i++)
	   if(b[i].c>=90 && b[i].c<=140 && b[i].d>=60 && b[i].d<=90)
	   {
	     a[i]=1;
	   }
	   else
	   {
	     a[i]=0;
	   }
	for(i=0;i<n;i++)
	{
	  if(a[i]==1)
	  {
	    c[e]++;
	  }
	  else
	  {
		  e++;
	  }
	}
	for(i=0;i<=e;i++)
	{
	  for(j=i+1;j<=e;j++)
	  {
	      if(c[i]<c[j])
		  {
		    d=c[j];
			c[j]=c[i];
			c[i]=d;
		  }
	  }
	}
	printf("%d",c[0]);
return 0;
}
/*
 * zhengchangxueya.cpp
 *
 *  Created on: 2012-10-20
 *      Author: 1200012791??
 *      ????????????????????????90 - 140????????60 - 90????????????????????????????????????????????????
 */
int main(){
    int n=0,i=0,j=0,k=0,s=0; //??3???????????0
    cin>>n; //??n
    int c[101];
    int a,b; //??????????????????????
    for(;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+1]=0; //?c[n+1]???????????
    for(;j<=k;j++){ //????
        if (s<c[j]) s=c[j]; //????????????????????????
    }
    cout<<s<<endl; //?????????
    return 0;
}
int main()
{
	int n,i,j,k,a[100],b[100],max;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	max=0;
	j=0;
	for(k=0;k<n;k++){
		if(a[k]<=140&&a[k]>=90&&b[k]>=60&&b[k]<=90)
			j++;
		else{
			if(j>max)
				max=j;
			j=0;
		}
	}
	if(j>max)
		max=j;
	printf("%d\n",max);
	return 0;
}
int main()
{
	int i,j,z[100]={0},max=0,x[100],y[100],n;
	scanf("%d\n",&n);
	for(i=0;i<=n-1;i++)
		scanf("%d %d\n",&x[i],&y[i]);
	i=-1;
	for(j=0;;j++)
	{for(i=i+1;i<=n-1;i++)
	    {if(x[i]>=90&&x[i]<=140&&y[i]>=60&&y[i]<=90)
		    z[j]=z[j]+1;
		else break;}
	if(z[j]>max)
		max=z[j];
	if(i>=n) break;
	}
	printf("%d",max);
	return 0;
	
}
int main()
{
	int a, b, c = 0, n, t = 0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a >> b;
		if(a >= 90 && a <= 140 && b >= 60 && b <= 90)
		{
			t = t + 1;
		}
		else
		{
			if (t > c)
				c = t;
			    t = 0;
		}
	}
	if(t > c)
		c = t;
	cout << c << endl;

	return 0;
}
/*
 * 1.cpp
 *  use:?????????????????????90 - 140????????60 - 90????????????????????????????????????????????????
 *  Created on: 2012-10-31
 *      Author: lyx
 */

int main ()
{
	int n=0,i1=0,i2=0,j1=0,j2=0,j3=0,i=0;            //????
	cin>>n;                                     //??????
	for(i=1;i<=n;i++)
	{
		cin>>i1>>i2;                            //????????
		if((i1>=90&&i1<=140)&&(i2>=60&&i2<=90)) //????????
			{
			    j1+=1;                          //?????????
			    j2=j1;                          //????????????????
			}
		else
		{
			j1=0;                               //????????
		}
		if(j3<=j2)                              //??????????
			{

		    j3=j2;
			}

	}
	cout<<j3;
	return 0;
}
int main()
{
	int n,so[100],su[100],a[102]={0},i,d=0,c=0,b[102]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&so[i],&su[i]);
	}
	for(i=0;i<n;i++)
	{
		if(so[i]>=90&&so[i]<=140&&su[i]>=60&&su[i]<=90)
			a[i+1]=1;
	}
	a[n+1]=0;
	a[0]=0;
	for(i=0;i<n+2;i++)
	{
		if(a[i]==0)
		{
			b[c]=i-d-1;
			d=i;
			c++;
		
	
		}
	}
	int max=b[0];
	for(i=1;i<c;i++)
	{
		if(b[i]>max)
			max=b[i];
	}
	printf("%d",max);
	return 0;
}
int zh(int x,int y){
	if(x>=90&&x<=140&&y>=60&&y<=90){return 1;}
    else{return 0;}
}


int main(){
int i,j,p=0,a[300],b[300],n;
scanf("%d",&n);
for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}
for(i=0;i<n;i++){
	if((zh(a[0],b[0])==1)||(zh(a[i],b[i])==1&&zh(a[i-1],b[i-1])!=1)){
		j=i;
		while(zh(a[j],b[j])!=0){j++;}
		if(p<j-i){p=j-i;}
	}
}
printf("%d",p);
return 0;
}
int main()
{
    int m,n,i,j,k,l,max,s;
	char ch[300];
	
    scanf("%d",&n);
	s=0;
         max=0;
	for(i=0;i<n;i++)
	{
	    scanf("%d%d",&j,&k);
		if(((j>=90)&&(j<=140))&&((k>=60)&&(k<=90)))
			s++;
	    else
		{
		    if(s>max)
				max=s;
			s=0;
		}
	}
	if(s>max)
		max=s;

	printf("%d",max);
	

	return 0;
}
/*????
 * 12.10.17a.cpp
 *  Created on: 2012-10-17
 *      Author:???
 *      ???????????????????
 */
int main()
{	int n,a,b,c=0,d=0,i=1;
	cin>>n;
	while(i<=n)
	{
		for(;i<=n;i++)
		{cin>>a>>b;
		if(a>=90&&a<=140&&b>=60&&b<=90)
			{d=d+1;
			continue;
			}
		else
			{ if(d>c)
					{
					c=d;d=0;i++;break;
					}
			else {d=0;i++;break;}
			}
		}
	}
	if(d>c)c=d;
	cout<<c;
return 0;
}
int main()
{
	int n,i,a[1000],b[1000],k=0,c[1000]={0},max;
    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))
	{
		k=k+1;
	}
	 else
	{ 
		k=0;
	}
	 c[i]=k;
	}
	max=c[0];
	for(i=0;i<n;i++)
	{
		if(c[i]>max)
		{
			max=c[i];
	}
	}
	printf("%d",max);
return 0;
}
//***************************************
//* ???5.cpp  **
//* ??????  1200012971  **
//* ????????????????? **
//* ???2012.10.10 **
//****************************************
int main()
{
	int i,n,a,b,t = 0,T = 0;                       //??n????a????b???????t,T?????
	cin >> n;                          //????
	for ( i = 1;i <= n;i++ )
	{
		cin >> a >> b;                              //????????
		if (a <= 140 && a >= 90 && b >= 60 && b <= 90)     //????????
			t = t + 1;                                  //????????
		else
		
		{
			if (t >= T)                               //??????t????T???t????0
				T = t;
			t = 0;
		}
	}
   if (t >= T)
	   cout << t <<endl;                             //????????
   else 
	   cout << T <<endl;
	return 0;
}
int main(){
	int n,i,s[101][2],r[101],sum,a,sz[101],j,max;
	sum=0;
	j=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&s[i][0],&s[i][1]);
	}
	for(i=0;i<n;i++){
		if((s[i][0]>=90)&&(s[i][0]<=140)&&(s[i][1]>=60)&&(s[i][1]<=90)){
			r[i]=1;
		}else{
			r[i]=0;
		}
	}
	r[n]=0;
	for(i=0;i<n;i++){
		sz[i]=0;
	}
	for(i=0;i<n-1;i++){
		if((r[i]==1)&&(r[i+1]==1)){
			sum++;
		}
		if(r[i+2]==0){
			sz[j]=sum;
			j++;
			sum=0;
		}
	}
	max=sz[0];
	for(i=0;i<j;i++){
		if(sz[i]>max){
			max=sz[i];
		}
	}
	sum=max;
    for(i=0;i<n;i++){
		if(r[i]!=0){
			a=1;
			break;
		}else{
			a=0;
		}
	}
	printf("%d",sum+a);
    return 0;
}
int main(){
int n;
scanf("%d",&n);
int i,a,b,c,m=0,k=0;
for(i=0;i<n;i++){
	scanf("%d%d",&a,&b);
	if(i!=n-1){	
		if(a>=90&&a<=140&&b>=60&&b<=90){
			k++;
		}
		else{
			if(k>m){
				m=k;
				k=0;
			}
			else{
				k=0;
			}
		
		}
	}
	else{
		if(a>=90&&a<=140&&b>=60&&b<=90){
			k++;
			if(k>m){
				m=k;
			}
		}
		else{
			if(k>m){
				m=k;
			}
		}

	}
}
printf("%d",m);
return 0;
}
/************************************
 *   ??????? 				*
 *   ??????  1200012815		*
 *   ???2012.10.8				*
 ************************************/

int main()
{
	int n, i = 1, a, b, c = 0, d = 0;//i??????n??????a?b??????c??????????d????????
	cin >> n;
	while (i <= n)//??n???
	{
		for (;i <= n;i++)//???????
		{
			cin >> a >> b;
			if (a <= 140 && a >= 90 && b <= 90 && b >= 60)
			{
				c++;continue;//????????
			}
			else
			{
				if (c >= d)
				d = c;//???????????????d
				c = 0;//c??
				i++;//??????i+1
				break;
			}
		}
		if (c > d)
			d = c;//??????????????
	}
	cout << d << endl;
	return 0;
}
int main(){
	int n,i,s1[100],s2[100],c=0,max=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&(s1[i]),&(s2[i]));
		if(i==0){
			if(s1[i]>=90&&s1[i]<=140&&s2[i]>=60&&s2[i]<=90){
				c++;
				max=c;
			}else{
				continue;
			}
		}else{
			if(s1[i]>=90&&s1[i]<=140&&s2[i]>=60&&s2[i]<=90){
				c++;
				if(max<c){
					max=c;
				}
			}else{
				c=0;
			}
		}
	}
	printf("%d",max);
	return 0;
}
int main(){
	int n,a[100],b[100],i,m,sz[100],k,e;
	scanf("%d",&n);
	for(i=0;i<n;i++){\
		scanf("%d %d",&a[i],&b[i]);
	}
	m=0;
	for(i=0;i<n;i++){
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
			m++;
		}else{
			m=0;
		}
		sz[i]=m;
	}
	for(i=1;i<=n;i++){
		for(k=0;k<n-i;k++){
			if(sz[k]<sz[k+1]){
				e=sz[k+1];
				sz[k+1]=sz[k];
				sz[k]=e;
			}
		}
	}
	printf("%d",sz[0]);
	return 0;
}
int main()
{   
    int i,n[1000],m[1000],k,a,s,p;
	scanf("%d",&k);
	int d[1000]={0};
	for (i=0,a=0;i<k;i++){
		scanf ("%d%d",&m[i],&n[i]);
		if (m[i]>=90&&m[i]<=140&&n[i]<=90&&n[i]>=60){
           d[a]++;
		}
		else {
			a++;
		}
		p=a;
	}
	for (i=p;i>0;i--){
		if (d[i]>d[i-1])
		{
			s=d[i];
			d[i]=d[i-1];
			d[i-1]=s;
		}
	}
	printf ("%d",d[0]);

	return 0;
}
int main(){
	int n,i,sz[100],ss[100],cx[100],k,s,e,p=0;
	scanf("%d",&n);
    for(i=0;i<n;i++) scanf("%d %d",&sz[i],&ss[i]);
	for(i=0;i<n;i++) if(sz[i]>=90&&sz[i]<=140&&ss[i]>=60&&ss[i]<=90) {
		p=1;
		break;
	}

	for(i=0;i<n;i++) cx[i]=1;
	for(i=0;i<n;i++) if((sz[i-1]<=90||sz[i-1]>=140||ss[i-1]<=60||ss[i-1]>=90)&&sz[i]>=90&&sz[i]<=140&&ss[i]>=60&&ss[i]<=90&&sz[i+1]>=90&&sz[i+1]<=140&&ss[i+1]>=60&&ss[i+1]<=90) {
		s=i;
		for(e=s+1;sz[e]>=90&&sz[e]<=140&&ss[e]>=60&&ss[e]<=90;e++) cx[i]++;
	}
	for(k=1;k<=n;k++) for(i=0;i<n-k;i++) if(cx[i]>cx[i+1]) {
		e=cx[i+1];
		cx[i+1]=cx[i];
		cx[i]=e;
	}
    if(p==1) printf("%d",cx[n-1]);
	else printf("0");
	return 0;
}
int main (){
 int max=0,sum=0;
int i,n;
int ss[100],sz[100];
  
  scanf("%d",&n);
 
  for(i=0;i<n;i++){
	  scanf("%d %d",&ss[i],&sz[i]);
    
    }

  for(i=0;i<n;i++){
  
	  if(ss[i]>=90&&ss[i]<=140&&sz[i]>=60&&sz[i]<=90){
	  
	   sum++;}
	  else{
		  max=max>=sum? max:sum;
		  sum=0;
		  continue;
	     }
  }
  max=max>=sum? max:sum;
printf("%d",max);
return 0;
}
int main()
{
  int n,k,sum=0,a,b,max=0;
  int i,result=0;
  scanf("%d",&n);
  for (i=1;i<=n;i++)
  {
      scanf("%d %d",&a,&b);
      if (a>=90 && a<=140 && b>=60 && b<=90)
                 sum++;
                 else {
                      if (sum>max) max=sum;
                      sum=0;
}   
}          
if (sum>max) max=sum;
 printf("%d",max);
  return 0;
}