semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int  main(){
	int n,e,i,max;
	int ss[99],sz[99];
	int jg[99];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf(" %d %d",&ss[i],&sz[i]);
		if((ss[i]>=90)&&(ss[i]<=140)&&(sz[i]>=60)&&(sz[i]<=90)){
			jg[i]=1;
		}else{
			jg[i]=0;
		}
	}
	e=0;
	max=0;
	for(i=0;i<n;i++){
		if(jg[i]==1){
			e++;
		}
        if((e!=0&&jg[i]==0)||i==n-1){
				if(e>=max){
					max=e;
				}
				e=0;
		}
	}
	printf("%d",max);
	return 0;
}
int main()
{
    int n,k,a,b,m,l,s;
    scanf("%d",&n);
    k=0;
    m=0;
    s=0;
    while(m<n){
               scanf("%d %d",&a,&b);
               if((a>=90)&&(a<=140)&&(b>=60)&&(b<=90)){
                                                       k=k+1;
                                                       m=m+1;
                                                       } 
               else{
                    m=m+1;
                    if(s<k){
                            s=k;
                            }
                    k=0;
                    }
                    }
 if(s<k){
    s=k;
    }
    printf("%d",s);
    return 0;
    }
int main()
{
	int i,n,x[100],y[100],z[100],s=0,t=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d %d",&x[i],&y[i]);
		if(x[i]<=140&&x[i]>=90&&y[i]<=90&&y[i]>=60){
			z[i]=1;
			
		}
		else {z[i]=0;}
	}
	for(i=1;i<=n;i++){
		if(z[i]==1){
			s=s+1;
		}
		if(z[i]==0||i==n){
			if(s>t){
				t=s;
			}
			s=0;
		}
	}

printf("%d",t);
	return 0;
}
int main()
{
	int n,i,a,b,x,y;
	y=0;
	x=0;
	i=1;
	scanf("%d",&n);
	while(i<=n){
		scanf("%d%d",&a,&b);
		if(a>=90&&a<=140&&b>=60&&b<=90){
			x=x+1;
			i=i+1;
		}else{
			if(y<x){
				y=x;
				x=0;
				i=i+1;
			}else{
				x=0;
				i=i+1;
			}
		}
	}
		    	if(y<x){
				y=x;
				printf("%d",y);
				}else{
			     printf("%d",y);
				}



 	return 0;
}
int main(){
    int a[100],b[100];
    int n,k=0,i,max=0;
    int shuzu[100]={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]<=140&&a[i]>=90&&b[i]>=60&&b[i]<=90){
                                                                k++;
                                                                shuzu[i]=k;
                     }else{
                           k=0;
                           }
    }
    for(i=0;i<n;i++){
                     if(shuzu[i]>max){
                                      max=shuzu[i];
                                      }
                     }
    printf("%d",max);
    return 0;
}
int main(){
   int a,b,n,c,d,e,f;
   d=0;
   e=0;
   scanf("%d",&n);
   for(a=0;a<n;a+=1){
       scanf("%d%d",&b,&c);
       if((b>=90)&&(b<=140)&&(c>=60)&&(c<=90)){
            d+=1;
            if(d>e){
               e=d;
                }}
       else{
               d=0;}
          }
   printf("%d\n",e);
   return 0;
}
int main(){
	int m,i;
	scanf ("%d",&m);
	int a[101],b[101],c[101];
	for (i=0;i<m;i++){
		scanf ("%d%d",&a[i],&b[i]);
		if (90<=a[i]&&140>=a[i]&&60<=b[i]&&90>=b[i]){
			c[i]=1;
		}
		else {
			c[i]=0;
		}
	}
	int q=0,p=0;
	for (i=0;i<m;i++){
		if (c[i]==1){
			p++;
		}
		if (p>q){
			q=p;
		}
		if (c[i]==0){
			p=0;
			continue ;
		}
	}
	printf ("%d",q);
	return 0;
}
//**************************************************************************
//??????
//??????
//???2012.10.10
//**************************************************************************

int main()
{
	int n,i;                                  //????n?????i
	int x,y,hours,max;                        //?????????x??????y??????hours????????max
	cin >> n;
	int a[100],b[100],c[102];                 //??a?b??????????????c????????
	x=1;
	y=0;
	hours=0;
	max=0;
	memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
	memset(c,0,sizeof(c));                    //?????
    for (i=0;i<n;i++)         
	{
		cin >> a[i] >> b[i];
		//cout << "????????" << endl;
	}
	for (i=0;i<n;i++)
	{
		if ((a[i]<=140)+(a[i]>=90)+(b[i]<=90)+(b[i]>=60)==4)
			c[i+1]=1;
		else c[i+1]=0;                        //??????1?????0???????????????0?1?????
	}
    for (i=1;i<=n;i++)
	{
		if ((c[i-1]==0)+(c[i]==1)==2)
			x=i;
		if ((c[i]==1)+(c[i+1]==0)==2)
			y=i;           
		hours=y-x+1;                          //??c????1????????????
		max=max > hours ? max : hours;        //?????hours???max
	}

    cout << max << endl;

return 0;
}
int main()
{
	int n,a[100],b[100],i,j,c[100],k=0,e;
	scanf("%d",&n);
	c[0]=0;
for(i=0;i<n;i++){
		scanf("%d%d",&a[i],&b[i]);
	}

if(n==1){
if(a[0]<=140&&a[0]>=90&&b[0]>=60&&b[0]<=90) printf("1");
else printf("0");
}

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



	
}
int main(){
    int k;
	scanf("%d",&k);
	int sz[1000],dz[1000],a,i,sz3[1000],b;
	a=0;
	for(i=0 ; i<k ; i++){
		scanf("%d %d",&sz[i],&dz[i]);
		
		if(sz[i]>=90 && sz[i]<=140 && dz[i]<=90 && dz[i]>=60){
		a=a+1;
		sz3[i]=a;
		}
		else{
			a=0;
		}
	}
	b=sz3[0];
	for(i=0 ; i<k ;i++){
	
			if(sz3[i]>b){
				b=sz3[i];}
	}


	printf("%d",b);
	return 0;
}
int main(){
    int n;
    scanf("%d",&n);
    int i,a,b,j=0,m=0,k=1;
    for(i=1;i<=n;i++){
                      while(i<=n){                      
                                 scanf("%d %d",&a,&b);
                                 
                                 
                      if(a>=90&&a<=140&&b>=60&&b<=90){
                                                      j++;
                                                      }
                      else{
                           break;
                           }
                      i++;
                                 }
                      if(j>m){
                              m=j;
                              
                              }
                      j=0;                    
                      }
    printf("%d",m);
    return 0;
    }
int main(){
	int n;scanf("%d",&n);
	int xueya[101][2],outcome[101];
	int i;
	for(i=0;i<n;i++){
		scanf("%d%d",&xueya[i][0],&xueya[i][1]);
		if(xueya[i][0]>=90 && xueya[i][0]<=140 && xueya[i][1]>=60 && xueya[i][1]<=90)	
			outcome[i]=1;
		else
			outcome[i]=0;
	}

	int j=0,k=0,m;
	int count[101];
	for(m=0;m<n;m++){
		if(outcome[m]==1)	count[m]=1;
		else count[m]=0;
	}
	for(j=0;j<n;j++){
		if(outcome[j]==1){
			for(k=j+1;k<n && outcome[k]==1;k++){
				count[j]++;
			}
		}
	}



	int p,q,t;
	for(p=n-1;p>0;p--){
		for(q=0;q<p;q++){
			if(count[q]>=count[q+1]){
				t=count[q];
				count[q]=count[q+1];
				count[q+1]=t;
			}
		}
	}
	printf("%d\n",count[n-1]);
	return 0;
}
int main(){
	int n,i,s=0,d=0;
	int 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-1;i++){
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
			s+=1;
		}else{
			if(s>d){
				d=s;
			}
			s=0;
		}
	}
	if(a[n-1]>=90&&a[n-1]<=140&&b[n-1]>=60&&b[n-1]<=90){
		s+=1;
		if(s>d){
			d=s;
		}
	}
	printf("%d",d);
	return 0;
}
int main(){
	int n,a[100],b[100],i,hour=0,c[100],k,x,j=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){
			hour++;
			c[j]=hour;
			j++;


		}
else{
		hour=0;
		c[j]=hour;
j++;
	}
	}

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

	}
	for(i=1;i<=n;i=i++)
	{
		if(m[0]<m[i-1])
			m[0]=m[i-1];
		if(m[0]>=m[i-1])
		    m[0]=m[0];
	}
	printf("%d",m[0]);
	return 0;
}
int main(){
	int nu;
	scanf("%d\n",&nu);
	struct aaa{
		int x,y;
	}time[100];
	int i;
	int h=0;
	int m=0;
	int s=0;
	for(i=0;i<nu;i++){
		scanf("%d%d",&(time[i].x),&(time[i].y));
	}
	for(i=0;i<nu;i++){
		if((time[i].x)<=140&&(time[i].x)>=90&&(time[i].y)<=90&&(time[i].y)>=60){
			h+=1;
			s=h;
		}else if(m<=h){
			m=h;
			h=0;
			continue;
		}else if(m>=h){
			h=0;
			continue;
		}
	}
	if(s>=m){
		printf("%d",s);
	}else{
        printf("%d\n",m);}
		return 0;
}
int main()
{
	int n;
	cin>>n;
	int m=0,t=0;
	for(int k=0;k<n;k++){
		int p1,p2;
		cin>>p1>>p2;
		if(p1<=140&&p1>=90&&p2<=90&&p2>=60){
			t++;
		}else{
			if(m<t){
				m=t;
			}
			t=0;
		}
	}
	if(m<t){
		m=t;
	}
	cout<<m;
	return 0;
}
int main(){
	int n,xue,shu,i,h[500],e;
	scanf("%d",&n);
	h[0]=0;
	for(i=1;i<=n;i++){
		scanf("%d %d",&xue,&shu);
		if(xue>=90&&xue<=140&&shu>=60&&shu<=90){
			h[i]=h[i-1]+1;
		}else{
			h[i]=0;
		}
	}
	e=h[0];
	for(i=1;i<=n;i++){
		if(e<h[i]){
			e=h[i];
		}
	}
	printf("%d",e);
	return 0;
}
int main(){
	int i,n,t=0,b=0,max[110],min[110];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&max[i],&min[i]);
	}
	if(max[0]>=90&&max[0]<=140&&min[0]>=60&&min[0]<=90){
		t++;
		b=t;
		}
	for(i=1;i<n;i++){
	    if(max[i]>=90&&max[i]<=140&&min[i]>=60&&min[i]<=90){
			if(max[i-1]>=90&&max[i-1]<=140&&min[i-1]>=60&&min[i-1]<=90){
				t++;
				if(t>b){b=t;}
			}else{
				t=0;
				t++;
                if(t>b){b=t;}
			}
		}else{
			if(max[i-1]>=90&&max[i-1]<=140&&min[i-1]>=60&&min[i-1]<=90){
				if(t>b){
					b=t;
					t=0;
				}
			}
		}
	}
	printf("%d",b);
	return 0;
}
/*????????????????????????90 - 140????????60 - 90????????????????
 * ?????????????????????????????????
 *????: 2012-10-15
 *??: ??
 */

int main ()
{
	int n, time[99], k = 0;       //time?????????????????
	memset(time, 0, sizeof(time));         //??????????0
	cin >> n;
	int high[n], low[n];
	for(int i = 0; i < n; i++)
		{cin >> high[i] >> low[i];
		if(high[i] >= 90 && high[i] <= 140 && low[i] >= 60 && low[i] <= 90)  //??????????+1????????????
			time[k]++;
		else
			k++;
		}
	int maxt = time[0];
	for(int j = 1; j <= k; j++)        //?maxt????????????
		if(time[j] > maxt)
			maxt = time[j];
	cout << maxt;
}
int main(){
	int n,i,j,a,max=0,y=0,sz[100][2];
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&(sz[i][0]),&(sz[i][1]));
	}
	for(j=0;j<n;j++){
		y=0;
		if((sz[j][0]>=90)&&(sz[j][0]<=140)&&(sz[j][1]>=60)&&(sz[j][1]<=90)){
			y++;
			for(a=j+1;a<n;a++){
				if((sz[a][0]>=90)&&(sz[a][0]<=140)&&(sz[a][1]>=60)&&(sz[a][1]<=90)){
					y++;
				}
				else{
					break;
				}
			}
		}
		if(y>max){
			max=y;
		}
	}
	printf("%d",max);
	return 0;
}
/*
 * 304.cpp
 *  Theme: ???? 
 *  Created on: 2012-10-24
 *  Author: ??? 
 */

int max (int a,int b)    //??????:?????????? 
{
	return a > b?a:b;
}

int main(){
    int n,a,b,k=0,sum=0;   //???? 
	cin >>n;               //??n 
	for (int i = 1;i <= n;i ++)
	{
		cin >>a >>b;
		if ((a >= 90 &&a <= 140) && (b >= 60 &&b <= 90))
			{sum ++;
		k = max(k,sum);}    //??max?? 
		else sum = 0;       //???????sum?? 

	}
	cout <<k <<endl;        //??k 
	return 0;
}
void bubble_sort(int a[],int n)
{
	int i,k,t;
	for (k=n-1;k>0;k--){
		for (i=0;i<k;i++){
			if (a[i]<a[i+1]){
				t=a[i];
				a[i]=a[i+1];
				a[i+1]=t;
			}
		}
	}
}


int main()
{
	int n;
	int shousuo,shuzhang;
	int i,j,k;
	int a[100];
	int b[100];
	scanf("%d",&n);
	j=0;
	for (i=0;i<100;i++){
		a[i]=0;
		b[i]=0;
	}
	for (i=0;i<n;i++){
		scanf("%d%d",&shousuo,&shuzhang);
		if (shousuo>=90&&shousuo<=140&&shuzhang>=60&&shuzhang<=90) a[i]=1;
			else a[i]=0;
	}
    for (i=0;i<n;i++){
		switch(a[i]){
		    case 1:
            b[j]++;
			break;
			default:
				j++;
		}
	}
    bubble_sort(b,99);
	printf("%d",b[0]);
	return 0;
}
int normal(int,int);
int main()
{
	int n,i,k=0;
	int shou,shu,max;
	int sz[1000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&shou,&shu);
		if(normal(shou,shu))
		{
			sz[k]++;
		}
		else
		{
			k++;
		}
	}
	max=sz[0];
	for(i=0;i<=k;i++)
	{
		if(sz[i]>max)
		{
			max=sz[i];
		}
	}
	printf("%d",max);
	return 0;
}
int normal(int shou,int shu)
{
	if(shou<=140&&shou>=90&&shu<=90&&shu>=60)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}
int main()
{
    int n,t=0,i,a,b=0,c=0;
    int x[100],y[100];
    scanf("%d",&n);
    for (i=1;i<=n;i++)
    {
        scanf("%d %d",&x[i-1],&y[i-1]);
        if (x[i-1]>=90&&x[i-1]<=140&&y[i-1]>=60&&y[i-1]<=90)
        {
           a=i;
          if (t==0)
          {
            t=1;
            b=a;
          }
          if ((a-b)==1)
          {
           t++;
           }
          else 
          {
            if (t>c)
            { 
            c=t; 
            } 
            t=1;
          } 
        } 
        b=a;
   } 
 if (t>c)
            { 
            c=t; 
            } 
    printf("%d",c);
    return 0;   
}
int main(){
int m,n,i,j;
int a[100],b[100],c[100];
	for(i=0;i<99;i++){
		c[i]=0;
	}
	scanf("%d",&n);
j=0;
for(i=0;i<n;i++){
	scanf("%d %d",&a[i],&b[i]);
	if(a[i]<=140&&a[i]>=90&&b[i]<=90&&b[i]>=60){
		c[j]++;
	}else{
		j++;
	}
}
	for(i=0;i<99;i++){
		if(c[i]>c[i+1]){
			m=c[i+1];
			c[i+1]=c[i];
			c[i]=m;
		}
	}
	printf("%d",c[99]);
	return 0;
}
int main(){
int n,i,a[1000],b[1000],c=0,d=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){
c+=1;
}
else{
if(c>d){
d=c;
c=0;
}else{
c=0;
}
}
}
if(d>c){
printf("%d",d);
}else{
printf("%d",c);
}



return 0;
}
int panduan(int a,int b)
{
   if(a>=90&&a<=140&&b>=60&&b<=90)return 1;
   else return 0;
}
int main()
{
    int n,res,temp,a,b;
    res=0;
    temp=0;
    cin>>n;
    while(n--)
    {
       cin>>a>>b;
       if(panduan(a,b))temp+=1;
       else
       {
          if(temp>res)res=temp;
          temp=0;
       }
     }
     if(temp>res)res=temp;
     cout<<res<<endl;
return 0;
}
int main(){
	int n;
	scanf("%d\n",&n);
	int i=1;
	int m=0;
	int max=0;
	while(i<=n){
		int s,z;
		scanf("%d%d",&s,&z);
		if(s>=90&&s<=140&&z<=90&&z>=60){
			m=m+1;
		}else{
			if(max>m){
				max=max;
			
			}else{
				max=m;
			}
			m=0;
		}
		i=i+1;}
	if(max>m){
				max=max;
			
			}else{
				max=m;
			}
	printf("%d",max);
return 0;}
int main()
{
	int n,i,hour,answer,k,p;
	int sys[100];
	int dia[100];
	int hours[100];
	//???????sys???????dia???????hours???????
	scanf("%d",&n);
	for(i=1,k=0,hour=0;i<=n;i++)
	{
		scanf("%d%d",&sys[i],&dia[i]);
		if(sys[i]<=140&&sys[i]>=90&&dia[i]<=90&&dia[i]>=60)
		{
			hour+=1;
			if(hour>k)
				k=hour;
			else
				k=k;
		}
		else
			hour=0;
		hours[i]=hour;
	}
	hours[0]=0;
	for(i=1,answer=0;i<=n;i++)
	{
		if(hours[i]>=hours[i-1])
			answer=hours[i];
		else
			answer=answer;
	}
	answer=k;
	printf("%d\n",answer);
	return 0;
}
int main()
{
    int i,j,k[100],l,n,m;
	struct
	{
		int a;
		int b;
	}
	q[100];
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d %d",&q[i].a,&q[i].b);
	}
	for(i=0;i<=99;i++)
		k[i]=0;
	l=0;
	for(i=0;i<=n-1;i++)
	{
		if(q[i].a<=140&&q[i].a>=90&&q[i].b>=60&&q[i].b<=90)
			k[l]+=1;
		else
		{
			l+=1;
		}
	}
	m=0;
	for(i=0;i<=l+1;i++)
	{
		if(m<k[i])
			m=k[i];
	}
	printf("%d",m);
	return 0;
}
int main(){
int e,n,m,i;
m=0;
e=0;
int 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){
		if(b[i]>=60&&b[i]<=90){
		m++;
		
		if(m>e){
		e=m;
		}
		
		}
		else{m=0;}
	
	}
	else{m=0;}

}
printf("%d",e);



    return 0;
    }
int main()
{
	int n,a,b,t=0,m=0;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a>>b;
		if( (a-90)*(a-140)<=0 &&(b-60)*(b-90)<=0 )
		 t+=1;
		else t=0;
		if( t>m ) m=t;
	}
	cout<<m<<endl;

	return 0;
}
int main()
{
    int n,a,b,i,c,temp=0;
    int j=0;
    scanf("%d",&n);
    for(i=1;i<=n;i=i++){
            scanf("%d %d",&a,&b);
              if(a>=90&&a<=140&&b>=60&&b<=90){
                   j=j++;
                   c=j;
                   if(temp<=c)
                     temp=c;
                     }
              else{
                 j=0;
              }
    }
    printf("%d",temp);
    scanf(""); 
    return 0;  
}
int main()
{
	int n=0;
	int h=0,l=0;
	cin>>n;
	int time=0;
	int max=0;
	for(int i=0;i<n;i++)
	{
		cin>>h>>l;
		if(h>=90&&h<=140&&l>=60&&l<=90)
		{
			time++;
			if(time>max)
				max=time;
		}
		else
			time=0;
	}
	printf("%d\n",max);
	return 0;
}
int main()
{
 int n,i,t,max,a[100],b[100],c[100];
 t=0;
 scanf("%d\n",&n);
 for(i=0;i<=n-1;i++){
 scanf("%d %d\n", &(a[i]),&(b[i]));
 if(a[i]<=140&&a[i]>=90&&b[i]>=60&&b[i]<=90){
 t=t+1;
 c[i]=t;
 }
 else{
 c[i]=t=0;
 
 }
 }
 max=c[0];
for (i=0;i<=n-1;i++){
	if (max<c[i]){
		max=c[i];
	}
}

 printf("%d",max);
 return 0;
}
int main(){
int n;
scanf("%d",&n);
int a[100];
int b[100];
for(int i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}
int s[100];
for(int m=0;m<n;m++){
if(a[m]>=90&&a[m]<=140&&b[m]>=60&&b[m]<=90){
s[m]=1;
}
else{
s[m]=0;
}
}
int q=1;
for(int k=0;k<n-1;k++){
if(s[k]!=0&&s[k+1]!=0){
s[k+1]=s[k]+1;
}
}
int max=0;
for(int p=0;p<n;p++){
if(s[p]>=max){
max=s[p];
}
}
printf("%d",max);
return 0;
}
int main()
{
	int a,b,n;
	int i=1,h=0,t=0;
	scanf("%d",&n);
	while(i<=n)
	{
		scanf("%d %d",&a,&b);
		i=i+1;
		if(a>=90&&a<=140&&b>=60&&b<=90)
		{
			h=h+1;
			if(h>=t)
				t=h;
		}
		else if(h>=t)
		{
			t=h;
			h=0;
		}
		else
		{
			t=t;
			h=0;
		}
	}
	printf("%d",t);
	return 0;
}
int main(){
	int n;
	int i;
	int a;
	int b;
	b=0;
	a=0;
	int zzd[101];
	int hzy[101];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&zzd[i],&hzy[i]);
	}
	for(i=0;i<n;i++){
		if(zzd[i]>=90&&zzd[i]<=140&&hzy[i]>=60&&hzy[i]<=90){
               a++;
		}
		else{
			if(a>b){
				b=a;
			}
			a=0;
		}
	}
	if(b>a){
	printf("%d",b);
	}
	else if(b<=a){
		printf("%d",a);
	}
	return 0;
}
int main()
{
	int n, a, b, c=0, d, i=1, j=0;                //??????
	int m[100]={0};                                //????
	cin >> n;                                     //??n
	for (i=1;i<=n;i++)                            
	{
		cin >> a >> b;
		if (a>=90 && a<=140 && b>=60 && b<=90)    //??????1
			c++;
		else
		{
			j++;                                  //?????c,??
			m[j]=c;
			c=0;
		}
		if (i==n)                                //??????????c
		{
			j++;
			m[j]=c;
		}		
	}
	for (i=1;i<=j;i++)                           //??????????
	{
		if (m[i]<=m[i+1])
			d = m[i+1];
		else
		{
			m[i+1] = m[i];
			d = m [i+1];
		}
	}
	cout << d << endl;                           //???????
	return 0;
}
int main(){
	int high[100],low[100],count,max,all,i;
	scanf("%d",&all);
	max=0;
	for(i=0;i<all;i++){
		scanf("%d %d",&high[i],&low[i]);
	}
	for(i=0;i<all-1;i++){
		if(high[i]>=90&&high[i]<=140&&low[i]>=60&&low[i]<=90){
			count=0;
			while(high[i+1]>=90&&high[i+1]<=140&&low[i+1]>=60&&low[i+1]<=90){
				i++;count++;
			}
			count++;
			if(count>max){max=count;}

		}
	}
	if(all==1&&high[i]>=90&&high[i]<=140&&low[i]>=60&&low[i]<=90){max=1;}
	printf("%d",max);

	
return 0;
}
int main(){
   int n,i,j,y=0,max=0;
   int a[150],b[150],s[150];
   scanf("%d",&n);
   for(i=0;i<n;i++){
	   scanf("%d %d",&a[i],&b[i]); }
  
   int x[150];
   for(i=0;i<150;i++) {x[i]=0; s[i]=0;}
   
   for(i=0;i<n;i++){
	   if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90) x[i]=1;}
	  
   
   for(i=0;i<n;i++){ if(x[i]==1) max=1;}
   

    
 for(i=0;i<n;i++){
	 if(x[i]==1&&(x[i+1]==1||i==n-1)) s[y]++;
	 else if(i!=1&&i!=n-1&&x[i]==1&&x[i-1]==1&&x[i+1]==0) s[y]++;
	 else y++;}

int js[150];
   
for(i=0;i<n;i++){
	
        if(s[i]>max) max=s[i];}


   printf("%d",max);


	return 0;
}
int main(){
    int n,a,b,t,i,c;
	scanf("%d\n",&n);
	t=0;
	c=0;
	i=1;
	while(i<=n-1){
		scanf("%d%d\n",&a,&b);
		if(a>=90&&a<=140&&b>=60&&b<=90){
			t++;
			if(c<t)
				c=t;
		}
		else
			t=0;
		i++;
	}
    scanf("%d%d",&a,&b);
	if(a>=90&&a<=140&&b>=60&&b<=90){
			t++;
			if(c<t)
				c=t;
	}
	printf("%d",c);
   return 0;
}
int OK(int a,int b);
int max(int a[],int n);
int n,high[100],low[100],length[100];
int main(){
int i,t=0;
scanf("%d",&n);
for(i=0;i<100;i++)
length[i]=0;
for(i=0;i<n;i++)
scanf("%d%d",&high[i],&low[i]);
for(i=0;i<n;i++)
if (OK(high[i],low[i])==1)
switch(OK(high[i+1],low[i+1])){
case 1:length[t]+=1;break;
case 0:length[t++]+=1;
}
printf("%d",max(length,t));
return 0;
}
int OK(int a,int b)
{return a>=90&&a<=140&&b>=60&&b<=90;}
int max(int a[],int n)
{
int i,max;
max=a[0];
for(i=1;i<n;i++)
if(max<a[i])
max=a[i];
return max;}
int main(){
    int h,tag=0,i,j,n,xy[100][2],sz[2];
	sz[0]=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		for(j=0;j<2;j++){
		   scanf("%d",&xy[i][j]);
		}
	}
	for(h=0;h<n;h++){
		if(xy[h][0]>=90&&xy[h][0]<=140&&xy[h][1]>=60&&xy[h][1]<=90){
              tag++;
		}
		else{
			if(sz[0]<tag){
			sz[0]=tag;
			tag=0;
			}
			else{
				tag=0;
			}
		}
	}
	if(sz[0]<tag){
		sz[0]=tag;
	}
	printf("%d",sz[0]);
	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,&m);
 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,ss[100],sz[100],time[100];
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",&ss[i]);
        scanf("%d",&sz[i]);}
    int h=0,j=0;
    for(int k=0;k<n;k++){
        if((ss[k]>=90)&&(ss[k]<=140)&&(sz[k]>=60)&&(sz[k]<=90)){
            h++;}
        else{
            time[j]=h;
            j++;
            h=0;}}
    int e=0;
    for(int l=0;l<j;l++){
        if(e<time[l]){
            e=time[l];}}
    if(e>=h){
           printf("%d",e);}
    else{
           printf("%d",h);}
    return 0;
}
int main(){
    int n,a[100],b[100],t[100],m=0,s=0,i;
	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)){
		t[i]=1;
		}else{t[i]=0;}
	}
	for(i=0;i<n;i++){
		if(t[i]==1){
	s+=1;}
		else{
			if(m<s){
				m=s;}
	s=0;
	}}
    if(m<s){
				m=s;}
	printf("%d",m);
	return 0;
}
int main()
{
	int n,i,a,b,k=0,j=0,p;
	int sz[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&a,&b);
		if(a>=90&&a<=140&&b>=60&&b<=90){
			k++;
		}else{ 
			j++;
			sz[j]=k;
			k=0;
		}
	}
	for(p=0;p<j;p++){
		k=sz[p]>k?sz[p]:k;
	}
	printf("%d",k);
	return 0;
}
int main(){
	int n;
	int t1=0;
	int t2=0;
	int j=1;
	int a[100],b[100];
	
	scanf("%d",&n);
	int i;

	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){
			t2+=1;
			if(t2>t1){
				t1=t2;
			}
		}
		
		
		else{
			t2=0;
		}
	}

	
	printf("%d",t1);
	



	return 0;
}
int main()
{
    int n,i,j=0,k,a;
    int xy[101][2],xs[101]={0};
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d%d",&xy[i][0],&xy[i][1]);}
    for(i=0;i<n;i++){
        if(xy[i][0]>=90&&xy[i][0]<=140&&xy[i][1]>=60&&xy[i][1]<=90)
            xs[j]++;
        else j++;}
    for(i=1;i<=100;i++){
        for(k=0;k<=100-i;k++){
          if(xs[k]>xs[k+1]){
                            a=xs[k];
                            xs[k]=xs[k+1];
                            xs[k+1]=a;}}}
    printf("%d",xs[100]);
    
    return 0;
}
int x[100],y[100];
int main()
{
	int n,i,j,hour,maxhour;
	hour=0;
	maxhour=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		for(j=1;j<=n;j++)
		{
			scanf("%d %d\n",&x[i-1],&y[j-1]);
			if(x[i-1]>=90&&x[i-1]<=140&&y[j-1]>=60&&y[j-1]<=90)
			{
			hour++;
			}else{
				if(maxhour<hour)
				{maxhour=hour;
			}hour=0;
			}
		}
	}
	if(maxhour<hour)
	{maxhour=hour;
	}
	printf("%d",maxhour); 
return 0;
}
int main(){
    int n;
    int beg[100],end[100],ti[100]={0},t=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d%d",&beg[i],&end[i]);
    }for(int i=0;i<n;i++){
        if(beg[i]>=90&&beg[i]<=140&&end[i]>=60&&end[i]<=90)
            ti[i]=1;
        for(int j=i+1;j<n;j++){
        if(beg[j]>=90&&beg[j]<=140&&end[j]>=60&&end[j]<=90)
            ti[i]++;
        else break;
    }
    }
    for(int i=0;i<n;i++){
        if(t<ti[i])
            t=ti[i];
    }
    printf("%d",t);
    return 0;
}
int main()
{
	int n,n1,n2,i,h,hmax;
	cin>>n;
	h=0;
	hmax=h;
    for(i=1;i<=n;i=i+1)
	{
		cin>>n1>>n2;
			if(n1>=90&&n1<=140&&n2>=60&&n2<=90)
			{
				h=h+1;
			}
			else
			{
				if(h>hmax)
				{
					hmax=h;
				    h=0;
				}
			else
			{
				hmax=hmax;
			    h=0;
			}
			} continue;
	}
	if(h>hmax)
	{
		hmax=h;
	}
	else
	{
		hmax=hmax;
	}
	cout<<hmax<<endl;
	return 0;
}