semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
    int n;
    int k=0;
    int c=0;
    scanf("%d",&n);
    int a[n];
    int b[n];
    for(int i=0;i<n;i++)
    {
        scanf("%d%d",&(a[i]),&(b[i]));
        if((a[i]>=90)&&(a[i]<=140)&&(b[i]<=90)&&b[i]>=60)
        {
            c++;
        }
        else
        {
            if(c>k)
            {
                k=c;
            }
            c=0;
        }
    }
    if(c>k)
    {
    printf("%d\n",c);
    }
    else
    {
        printf("%d\n",k);
    }
    return 0;
}
int main(){
	int ss[100],sz[100],n,h=0,i,sc[100]={0},e,k,c;
   scanf("%d",&n);
   for(i=0;i<n;i++){
	   scanf("%d%d",&ss[i],&sz[i]);
	   if(ss[i]<=140&&ss[i]>=90&&sz[i]>=60&&sz[i]<=90){
		   h++;
	   }else{
		   sc[i]=h;
		   h=0;
	   }
	  
   } c=h;
   
   for(k = 1 ; k <=100; k++){
    	for(i = 0; i < 100-k; i++){
			if(sc[i] < sc[i+1]){
					e = sc[i+1];
					sc[i+1] = sc[i];
					sc[i] = e;
			}
		}
	}
   if(c<sc[0]){
	   printf("%d",sc[0]);
   }else{
	   printf("%d",c);
   }
	return 0;
}
int main()
{
	int sz[100];
	int g,d,n,i,k=0,j,q;
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		sz[i]=0;
	}
	
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&g,&d);
		if(g>=90&&g<=140&&d>=60&&d<=90)
		{
			sz[k]=sz[k]+1;
		}
		else
		{
			k=k+1;
		}
	}
	int e;
	for(q=1;q<k+1;q++)
	{
		for(j=0;j<k+1-q;j++)
		{
			if(sz[j]<sz[j+1])
			{
				e=sz[j+1];                                                                       
				sz[j+1]=sz[j];
				sz[j]=e;
			}
		}
	}
	printf("%d",sz[0]);
	return 0;
}
int main()
{
	int n,sp[101],dp[101],d[101],h=0,max=0;//ps=systolic pressure,pd=diabolic pressure
	int i,j;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d%d",&sp[i],&dp[i]);
		if(sp[i]>=90&&sp[i]<=140&&dp[i]>=60&&dp[i]<=90){
			h++;
			d[i]=h;
		}
		else
			d[i]=h=0;
	}

//now for the maximum of duration//

	for(j=1;j<=n;j++){
		if(max>=d[j])
			continue;
		else 
			max=d[j];
	}
	printf("%d\n",max);
}
int main()
{
	int n,a[100],b[100],i,c,d[100],m;
	for(i=0;i<100;i++)
	{
		d[i]=0;
	}
	scanf("%d",&n);
	c=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
	}
	for(i=0;i<n;i++)
	{
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
		{
			c=c+1;
			d[i]=c;
		}
		else
		{
			d[i]=c;
			c=0;
		}
	}
	m=0;
	for(i=0;i<99;i++)
	{
		if(d[i]>m)
		{
			m=d[i];
		}
	}
	printf("%d",m);
    return 0;
}
/*
 * nbp.cpp
 *
 *  Created on: 2012-11-6
 *      Author: Lsj
 */
int main(){
	int n,i;//??????n?i
	cin>>n;
	int a[1000],b[1000],p[1000]={0};//????
	for(i=0;i<n;i++)
		cin>>a[i]>>b[i];//???a[]?b[]??
	if(a[0]>=90&&a[0]<=140&&b[0]>=60&&b[0]<=90)
		p[0]=1;
	else
		p[0]=0; //???????????????p[0]=1????0
	for(i=1;i<n;i++){
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
				p[i]=1+p[i-1];
			else
				p[i]=0;//????????????????????p????????0
	}
	for(i=1;i<n;i++){
		if(p[i]<p[i-1])
			p[i]=p[i-1];
	}//?p[]?????
	cout<<p[n-1];//??p????
	return 0;
}
int main (){
	int	c,n,i,j,k,h,max;
	int l[100];
	h=0;
	max=0;
	for (i=0;i<100;i++)
	{l[i]=0;
	}
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{scanf("%d %d",&j,&k);
	   if (j>=90 && j<=140 && k>=60 && k<=90)
	   {h++;
	   l[i]=h;
	   }else
	   {h=0;
	   }
	}
	for(i=0;i<100;i++){
		if(l[i]>l[max]){
			max=i;
		}
	}
	printf("%d",l[max]);
	return 0;
}
int main()
{
	int n,i,j=0,max=0,a[100],b[100],c[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]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
        {
			c[j]++;
		}   
		else
		{
			j++;
		}
	}
	for(i=0;i<n;i++)
	{
		if(c[i]>max)
			max=c[i];
	}
	printf("%d",max);
	return 0;
}
int main()
{
	int a[100][2],i,j,sum=0,n,sum_max=0;
	scanf("%d",&n);
	printf("\n");
	for(i =0;i<n;i++)
	{          
		for(j=0;j<2;j++)
		{
			scanf("%d",&a[i][j]);
		}	            
	}
	for(i=0;i<n;i++)
	{
		if(((a[i][0] >= 90) && (a[i][0] <= 140)) && ((a[i][1] <= 90) && (a[i][1] >= 60)))
		{		
			sum+=1;
		}
		else 
		{
			if(sum>sum_max)sum_max = sum;
			sum = 0;
		}
	}
	if(sum>sum_max)sum_max=sum;
	printf("%d",sum_max);
	return 0;
}
int main(){

int n;
scanf("%d",&n);

int sz[100][2];
int panduan[100];
int i,j;
for(i=0;i<n;i++){
	for(j=0;j<2;j++){
	scanf("%d",&(sz[i][j]));
	
	}
}

for(i=0;i<n;i++){
	
	if((sz[i][0]>89&&sz[i][0]<141)&&(sz[i][1]>59&&sz[i][1]<91)){
	panduan[i]=1;
	}
	else {panduan[i]=0;
	}
}

int cx[100]={0};
int e=0;
for(i=0;i<n;i++){
	if(panduan[i]==1){
	cx[e]++;
	}
	else if(panduan[i]==0){
	e++;
	}
}

int k,a,t;	
for(k=1;k<100;k++){
	for(t=0;t<100-k;t++){
		if(cx[t]<cx[t+1]){
		a=cx[t+1];
		cx[t+1]=cx[t];
		cx[t]=a;
		}
	}
}	
	
printf("%d",cx[0]);

return 0;
}
int main()
{   
    int i,n,ssy[100],szy[100];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d %d",&ssy[i],&szy[i]);
    }
    int m=0,j=0;
    int lx[100];
    for(i=0;i<n;i++)
    {
        if(ssy[i]>=90&&140>=ssy[i]&&szy[i]>=60&&90>=szy[i])
        {
            lx[j]=i;
            j++;
        } else lx[j]=-1;
    }
    int x=0,t=0,max=0;
    if(j>0)
    {
		m=1;
	for(t=0;t<=j;t++)
	{
	  if(lx[t+1]-lx[t]==1)
		  m++;
          if(lx[t+1]-lx[t]!=1)
          {
              if(max<=m)
              max=m;
              m=1;
          }
	}
    printf("%d",max);
    }
    else{printf("0");}
	return 0;
}
int main()
{
	int n, shou, shu, x, t = 0, y = 0;//?n??????shou?????shu????
	cin >> n;
	for(int i = 1; i <= n; i++ )
	{
		cin >> shou >> shu;
		if (( shou >= 90 ) && ( shou <= 140 ) && ( shu >= 60 ) && ( shu <= 90 ))//??????90-140???????60-90?????
			t = t + 1;
		if (( shou < 90 ) || ( shou > 140 ) || ( shu < 60 ) || ( shu > 90 ))
		{
			x = t;//?????????????????
			t = 0;//?t????x,??t???0
			if( x > y )
			y = x;//??x??y,??x???y
		}
	}
	if( t > y )
		cout << t << endl;
	else
		cout << y << endl;//????????????
return 0;
}
int main(){
	int n,a,b,s=0;
	int sb[120];
	for(int k=0;k<=120;k++){
	sb[k]=0;
	}
	scanf("%d\n",&n);
	for(int i=0;i<n;i++){
		scanf("%d %d",&a,&b);

		if(a<=140&&a>=90&&b>=60&&b<=90){
			s++;
			sb[i]=s;
		
		}

		else s=0;
	}
	for(int j=0;j<120;j++){
		if(sb[j+1]<sb[j])
			sb[j+1]=sb[j];
	}
	printf("%d",sb[119]);
			




return 0;
}
int main(){
  int n,i,j=0,m,a[N][2],b[N],c[N]={0};
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i][0]);
    scanf("%d",&a[i][1]);
    if(a[i][0]<=140&&a[i][0]>=90&&a[i][1]<=90&&a[i][1]>=60){
      b[i]=1;
    }else{
      b[i]=0;
    }
  }
  for(i=0;i<n;i++){
    while(j<n){
      if(b[j]==1){
        c[i]++;
        j++;
      }else{
        j++;
        break;
      }
    }
  }
  for(i=0;i<n;i++){
    for(j=0;j<n-i;j++){
      if(c[j]<c[j+1]){
        m=c[j];
        c[j]=c[j+1];
        c[j+1]=m;
      }
    }
  }
  printf("%d",c[0]);
  return 0;
}
int main()
{
	int n,a,b,cout=0,r=0,sz[100]={0};
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		scanf("%d%d",&a,&b);
		if(a>=90&&a<=140&&b>=60&&b<=90)
		{
			sz[r]++;
		}
		else
			r++;
	}
	int max=0;
	for(int j=0;j<100;j++){
		if(sz[j]>max)
			max=sz[j];
	}
	printf("%d\n",max);
	return 0;
}
int main(){
	int i,j,t;
	int n,k=0,m=0,s=0;
	int sz[100][2],lx[100]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++){
		for(j=0;j<2;j++){
			scanf("%d",&sz[i][j]);
		}
	}
	for(i=0;i<n;i++){
		if((sz[i][0]>=90)&&(sz[i][0]<=140)&&(sz[i][1]>=60)&&(sz[i][1]<=90)){
			lx[k]++;
		}
		else{
			k++;
		}
			
	}
	for(j=0;j<k;j++){
		for(i=0;i<k-j;i++){
			if(lx[i]<lx[i+1]){
				t=lx[i];
				lx[i]=lx[i+1];
				lx[i+1]=t;
			}
		}
	}


	
	printf("%d",lx[0]);




	return 0;
}
/*
 * 20121024-4.cpp
 *
 *  Created on: 2012-10-26
 *      Author: ???
 */



int main(){
	int n,count,number,i;
	cin>>n;
	count=0;
	int a[n],b[n],c[n];
	c[n]=0;
	for(i=1;i<=n;i++)
	{
		cin>>a[i]>>b[i];
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
		{
			count=count+1;//????????????????
			c[i]=count;//???????
		}
		else
		{
			count=0;
			c[i]=count;//???????0
		}
	}
	number=0;
	for(i=1;i<=n;i++)
	{
		if(c[i]>number) number=c[i];//???????????
	}
	cout<<number;
	return 0;
}
int main(){
int i,j=0,k,n,m=0,e;
int sh[3000];
int a[3000];
int b[3000];
int c[3000];




scanf("%d",&n);

for(i=0;i<3000;i++){
	sh[i]=0;
	 c[i]=0;

}


for(i=0;i<n;i++){
	scanf("%d",&a[i]);
	scanf("%d",&b[i]);
}

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

for(i=0,k=0;i<n;i++){
	if(sh[i]==1){
		c[k]++;

	
	
	}
	if(sh[i]==0){
		k++;

	
	
	}
}
e=0;
	for(i=0;i<n;i++){
        if(e<c[i]){
		   e=c[i];
		   
		}
	}


  

printf("%d",e);

return 0;
}
int main()
{
int x,y,i,j,k,max,n,t;
scanf("%d\n",&n);
i=1,j=1,k=1,max=0,t=0;
for(i=1;i<=n;i++)
{
scanf("%d %d\n",&x,&y);
if(x>=90&&x<=140&&y>=60&&y<=90)
{
k=i;
t=k-j+1;
if(max>=t)
max=max;
else
max=t;
}
else
{
k=i;
j=i+1;
}
}
printf("%d",max);
return 0;
}
int main () {
int a=0,i,n,s1[100],s2[100],h=0,s3[100]={0},max=0;
scanf("%d",&n);
for ( i=0;i<n;i++) {
    scanf("%d %d",&s1[i],&s2[i]);
}
 for (i=0;i<n;i++) {
     if (s1[i]>=90&&s1[i]<=140&&s2[i]>=60&&s2[i]<=90) {
        s3[i]=1;
        h=1;
        max=1;
        }
        }
    for (int j=0;j<n;j++) {
        if (s3[j]==0) {
                    a++;  
                      }
                      if (a==n) {
                                printf("0");
                              
                                return 0;                                }
                      }
     for (i=0;i<n-1;i++) {
         if (s3[i]==1&&s3[i+1]==1) {
           h++;
           }
           if (h>max) {
           max=h;
           }
           if (s3[i+1]==0||s3[i]==0) {
             h=1;
             }
             }
              printf("%d",max);



return 0;
}
int main(){
	int sz[101];
	int n,i,t=0,q,s=-1;
	int xy[100][2];
	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){
			t++;
		}
		if(xy[i+1][0]<90||xy[i+1][0]>140||xy[i+1][1]<60||xy[i+1][1]>90){
			s++;
			sz[s]=t;
			t=0;
		}
	}
	for(i=0;i<s;i++){
		if(sz[i]>sz[i+1]){
			q=sz[i];
			sz[i]=sz[i+1];
			sz[i+1]=q;
		}
	}
	printf("%d",sz[s]);
	return 0;
}
int main()
{
    int n, i, j = 0, t = 0, x1, x2;
    
    cin >> n;
    
    for(i = 0; i < n; i++)
    {
        cin >> x1 >> x2;
        
        if(x1 >= 90 && x1 <= 140 && x2 >= 60 && x2 <= 90) j++;
        else if(j == 0) continue;
        else if(j != 0)
        {
            t = t >=j ? t: j;
            j = 0;
        }
    }
    
    t = t >= j ? t : j;
    
    cout << t << endl;

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

	printf("%d",max);
	return 0;
}
int main()
{
	int n,i,j;
	int normalcnt=0;
	int normalstt=0;
	int tempcnt=0;

	scanf("%d", &n);
	while(n--)
	{
		int a,b;
		int curnml=0;
		scanf("%d%d", &a, &b);
		if (a>=90 && a<=140 && b>=60 && b<=90)
			curnml=1;
		else
			curnml=0;

		if (normalstt)
		{
			//????
			if (curnml)	//????
				tempcnt++;
			else //????
			{
				if(tempcnt>normalcnt)
					normalcnt=tempcnt;
				normalstt=0;
				tempcnt=0;
			}
		}
		else
		{
			//?????
			if(curnml)//???
			{
				normalstt=1;
				tempcnt++;
			}
		}
	}

	//????????
	if(normalstt&&tempcnt>normalcnt)
		normalcnt=tempcnt;

	printf("%d",normalcnt);

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


	return 0;
}
int main(){
	int n,max=0,i,jc=0,a[1000],b[1000];
	scanf("%d",&n);
	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("%d\n",n);
		}else printf("0");
	}
	else if(n!=1){
	for(i=0;i<n;i++){
		if((a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)){
			jc++;
			if(jc>max) max=jc;
		}
		else jc=0;
	}
	printf("%d\n",max);
	}
	
    return 0;
 }
int main(int argc, char* argv[])
{
	int i,n,high,low,number,k;
	scanf("%d",&n);
	number=0;
	k=0;
	for(i=1;i<=n;i++){
		scanf("%d %d",&high,&low);
		if((high<=140)&&(high>=90)&&(low>=60)&&(low<=90)){
			number+=1;
		}else{
			if(k<number){
				k=number;
			};
			number=0;
			continue;
		}
		if(k<number){
			k=number;
		};
	}
	printf("%d",k);
	return 0;
}
int main()
{
	int n,i,a[100],b[100],c[100]={0},k,j,e;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	for(k=n;k>0;k--){
		for(i=n-k;i<n;i++){
			if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
				c[i]++;
			}
			else{
				break;
			}
		}
	}
	for(j=1;j<n;j++){
		for(i=0;i<n-j;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 zh(int,int);
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]))||(zh(a[i],b[i])&&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 zh(int x,int y){
	if(x>=90&&x<=140&&y>=60&&y<=90){return 1;}
    else{return 0;}
}
int main(){
int n,i,j,t=0,e=0,k,a,b;
int an[50]={0};
scanf("%d",&n);
for(j=0;j<n;j++){
scanf("%d %d",&a,&b);
if(((a>=90)&&(a<=140))&&((b>=60)&&(b<=90))){
an[t]=an[t]+1;
}else{
t=t+1;
}
}
for(k=1;k<=t+1;k++){
	for(i=0;i<t+1-k;i++){
		if(an[i]>an[i+1]){
				e=an[i+1];
				an[i+1] =an[i];
				an[i] = e;
		}
}
}
printf("%d\n",an[t]);
return 0;
}
int main(){
	int n,i,k=0,a[100],b[100],c[100]={0},m;
	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[k]++;}
		else{k++;}
	}
	m=c[0];
	for(i=0;i<k+1;i++){
		if(m<c[i]){m=c[i];}
	}
	if(m==0){printf("%d",m);}
	else{printf("%d",m);}
	return 0;
}
int main()
{
	int shu[100],shou[100],t[100]={0};
	int i,n,j,k,e;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&shou[i],&shu[i]);
	}
	for(i=0;i<n;i++){
		for(j=0;j<n;j++){
			if(((shou[i+j]>=90)&&(shou[i+j]<=140))&&((shu[i+j]>=60)&&(shu[i+j]<=90))){
				t[i]++;
			}
			else{
				break;
			}
		}
	}
				
	for(k=1;k<=n;k++){
		for(i=0;i<n-k;i++){
			if(t[i]>t[i+1]){
				e=t[i+1];
				t[i+1]=t[i];
				t[i]=e;
			}
		}
	}
	printf("%d",t[n-1]);

	

	return 0;
}
int main(){
	int n,k,ssy[100],szy[100],t[100],cs[100],i,a;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&ssy[i],&szy[i]);
		if(ssy[i]>=90&&ssy[i]<=140&&szy[i]>=60&&szy[i]<=90){
			t[i]=1;
		}else{
			t[i]=0;
		}
	}
	for(i=0;i<n;i++){
		cs[i]=0;
		if(t[i]==1){
			for(k=i;k<n;k++){
				if(t[k]==1){
					cs[i]++;
				}else{
					break;
				}
			}
		}
	}
	for(i=1;i<=n;i++){
		for(k=0;k<n-i;k++){
			if(cs[k]<cs[k+1]){
				a=cs[k];
				cs[k]=cs[k+1];
				cs[k+1]=a;
			}
		}
	}
	printf("%d",cs[0]);
	return 0;
}
int main()
{
    int a[100],b[100],m[100];
	int max=0;
	int n,k=0,s=0;
	scanf("%d",&n);
	for(int 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++;
			m[s]=k;
			s++;
		}
		else
		{
			k=0;
		}
	}

for(int j=0;j<s;j++)
{
	if(m[j]>max)
	{
		max=m[j];
	}

}
printf("%d",max);
return 0;
}
int main()
{
	int a,b,n,i,j,c;
	c=0;
	scanf("%d",&n);
	int a1[100];
	for(j=0;j<100;j++)
	{
		a1[j]=0;
	}
    for(i=0;i<n;i++)
	{
		a=0;
		b=0;
		scanf("%d %d",&a,&b);
		if(a>89&&a<141&&b>59&&b<91)
		{
			a1[i+1]=a1[i]+1;
		}
	    if(a<90||a>140||b<60||b>90)
			{
				a1[i+1]=0;
			}
		
	}
	for(i=0;i<1+n;i++)
	{
		if(c<a1[i])
		{
			c=a1[i];
		}
         }
    printf("%d",c);
	return 0;
	
}
int main()
{
int a,b,n,i,j,max=0;
scanf("%d",&n);
int c[n],num[n];
for(i=0;i<n;i++){
    scanf("%d%d",&a,&b);
    if((a>=90 && a<=140) && (b<=90 && b>=60)){
    c[i]=1;
    }
    else c[i]=0;
}
for(i=0;i<n;i++){
    num[i]=0;
    if(c[i]==1){
        for(j=i;j<n;j++){
            if(c[j]==1){
                num[i]++;}
                else break;
        }
        }
            }
            for(i=0;i<n;i++){
                if(num[i]>max){
                    max=num[i];
                }
            }
            printf("%d",max);
    return 0;
}
int main(){
    int n;
    scanf("%d",&n);
    int shou[n];
    int zhang[n];
    for(int i=0;i<n;i++){
        scanf("%d %d",&(shou[i]),&(zhang[i]));
    }
    int a=0;
    int e=0;
     for(int i=0;i<n;i++){
       if(shou[i]>=90&&shou[i]<=140&&zhang[i]>=60&&zhang[i]<=90){
           a++;
           if(a>e){e=a;}
       }else{a=0;}
    }
    printf("%d",e);
    return 0;
}
int main()
{
  int n,k,row,col,x,y,a;
  int sz[100][2];
  scanf("%d\n", &n);
  if((n>0)&&(n<100)){
  for(row=0;row<n;row++){
	  for(col=0;col<2;col++){
  scanf("%d",&(sz[row][col]));
  }
  }
  k=0;
  a=0;
  for(row=0;row<n;row++){
	  x=sz[row][0];
	  y=sz[row][1];
	  if((x>=90)&&(x<=140)&&(y>=60)&&(y<=90)){
  k++;
  }else if(a<k){
		  a=k;
                    k=0;
  }else if(a>=k){
k=0;
}
  }
if(a<k) a=k;    
printf("%d", a);
  }

	return 0;
}
int main()
{
    int n,i,a,b,t=0,m=0;
    scanf("%d",&n);
    int sz[n];
    for(i=0;i<n;i++)
    {
        scanf("%d %d",&a,&b);
        if(a>89&&a<141&&b>59&&b<91)
        {
            sz[i]=0;
        }
        else{sz[i]=1;}
    }
    //for(i=0;i<n;i++)
    //{ printf("%d\n",sz[i]);}
    
    for(i=0;i<n;i++)
    {
        if(sz[i]==0) {t=t+1;}
      //  printf("%d%d",sz[i],t);
        if(sz[i]==1) {t=0; }
        if(m<t){ m=t;}
    }
    printf("%d\n",m);
    return 0;
}
int main()
{
    int i,n,shousuoya,shuzhangya,hour=0,c=0;
    cin >> n;
    
  for(i=1;i<=n;i++)
 {
   cin >> shousuoya >> shuzhangya;
   if(shousuoya>=90 && shousuoya<=140 && shuzhangya>=60 && shuzhangya<=90)
   {
    hour+=1;
   }
   else
   {
    if(hour>=c)
    { 
      c=hour;
      hour=0;
    }
    else
   {
     hour=0;
    }
   }
 }
if(hour>=c)
 {
   c=hour;
 }
 cout << c << endl;
return 0;
}
/*
 * 4.cpp
 *?????????????
 *  Created on: 2012-10-19
 *      Author: ??
 */

int main(){
	int n,i,j=0;
	cin>>n;//?????
	int a[n],b[n],c[n],d[n];
	for(i=0;i<n;i++){
		d[i]=0;//?????0??????????
		cin>>a[i]>>b[i];//??
		if(90<=a[i]&&a[i]<=140&&60<=b[i]&&b[i]<=90)
			c[i]=1;
		else c[i]=0;//?????1?????0
	}
	for(i=0;i<n;i++){
		if(c[i]==1) d[j]=d[j]+1;
		else j++;//???????????????j????
	}
	int tmax=0;
	for(j=0;j<n;j++) if(tmax<d[j]) tmax=d[j];//????
	cout<<tmax;//??
	return 0;
}
int main()
{
int n,s[100],z[100],i,j=0,a=0;
scanf ("%d", &n);
for (i=0;i<=n-1;++i)
{
scanf ("%d %d", &s[i],&z[i]);
}
for (i=0;i<=n-1;++i)
{
if (90<=s[i]&&s[i]<=140&&60<=z[i]&&z[i]<=90)
{
j=j+1;
}
else
{
if (a<=j)
{
a=j;
}
j=0;
}
}
if (a<=j)
{
	a=j;
}
printf ("%d", a);
return 0;
}
int main()
{
	int n,i,time,max;
	time=0;
	max=0;
	scanf("%d",&n);
	int a,b;
	for(i=1;i<=n;i++)
	{
		scanf("%d %d",&a,&b);
		if(a>=90&&a<=140&&b>=60&&b<=90)
		{
		time++;
			if(time>max)
			{
		    max=time;
			}
			else
			{
			max=max;
			}
						
		}
		else
		{
			if(time>max)
			{
		    max=time;
			}
			else
			{
			max=max;
			time=0;
			}
		}
	}
	printf("%d",max);
	return 0;
}
/*???????
  ??????1200012829
  ???2012.10.9*/
int main ()
{
	int n, a, b, i, x = 0, k = 0;
	cin >> n;
	for ( i = 1; i <= n; i++ )
	{
		cin >> a >> b;
		if ( 90 <= a && a <= 140 && 60 <=b && b <= 90)
		{
			x = x + 1;
		}
		else 
		{
			if ( k < x )
			{
				k = x;
			}
			x = 0;
		}
	}
	if ( k >= x )
	{
		cout << k << endl;
	}
	else
	{
		cout << x << endl;
	}
	return 0;
}
int main(){
	int a,b,i,n,m=0,p=-1,k=0;
	int sz[150]={0};
	scanf("%d",&n);
	if(n==1){
	scanf("%d%d",&a,&b);
	if(a>=90&&a<=140&&b>=60&&b<=90){
		p=0;
		}else{
			p=-1;
		}	
	}if(n>1){
	for(i=0;i<n;i++){
		scanf("%d%d",&a,&b);
		if(a>=90&&a<=140&&b>=60&&b<=90){
			sz[i]=1;
		}if(i>0){
			if(sz[i-1]==1&&sz[i]==1){
				m++;
				if(m>p){
				p=m;
			    }
			}else{
				m=0;
			}
			
		}
		
	}
	}if(p==-1){
	for(i=0;i<n;i++){
		if(sz[i]==1){
			k++;
		}
	}if(k!=0){
		p=0;
	}
}
	printf("%d",p+1);
	return 0;
}
int main()
{ int i,n,max ;
  max=0;
  scanf("%d",&n);
  int a[n],b[n],c[n];
  for (i=0;i<=n-1;i++)
   { scanf("%d%d\n",&a[i],&b[i]);
     if (90<=a[i] && a[i]<=140 && 60<=b[i] && b[i]<=90) 
	   if (i==0)  
		   c[i]=1;
	   else  c[i]=c[i-1]+1;
	 
	 else  c[i]=0;
	 if (c[i]>max)  
	   max=c[i];
   }
  printf("%d",max);
}
int main(){
	int i,n,a[100][2],k=0,max=0;
	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)
			k++;
		else{
			if(k>max)
				max=k;
			k=0;
		}
	}
	if(k>max)
		max=k;
	k=0;
	printf("%d\n",max);
	return 0;
}
int main()
{
    int a,b,t=0,m=0,n,i;
    cin>>n;
    for(i=1;i<=n;i++)
    {
                     cin>>a;
                     cin>>b;
                     if(a>=90&&a<=140&&b>=60&&b<=90)
                     {
                                                    t++;
                                                    if(i==n&&t>=m)
                                                    m=t;
                     }
                     else
                     {
                         if(t>=m)
                         m=t;
                         t=0;
                     }
    }
    cout<<m<<endl;
    

    return 0;
}
int main ()
{
	int n,i,max;
	int k=0;
	int a[N],b[N],c[N];
	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++;
			c[i]=k;
		} else {
			c[i]=k=0;
		}
	}
		max=c[0];
		for(i=0;i<n;i++){
			if(max<c[i]){
				max=c[i];
			}
		}
		printf("%d",max);
		return 0;
}
int main()
{
	int n,i,j,k[100]={0};
	int a[99][2];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d",&a[i][0],&a[i][1]);
	for(i=0,j=0;i<n;i++)
		if(a[i][0]>=90&&a[i][0]<=140&&a[i][1]>=60&&a[i][1]<=90)
			k[j]++;
		else
			j++;
	for(i=0,j=k[0];i<100;i++)
		if(k[i]>j)
			j=k[i];
	printf("%d\n",j);
	return 0;
}
int main()
{int n,i,max=0,j=0,a[100],b[100];
cin>>n;
for(i=0;i<=n-1;i++)
 cin>>a[i]>>b[i];
for(i=0;i<=n-1;i++)
   {
   if(a[i]>=90&&a[i]<=140&&b[i]<=90&&b[i]>=60)
    {j=j+1;
    if(j>max)
    max=j;}
  else 
    j=0;}
cout<<max<<endl;
return 0;}
int main()
{
    int i,n,c,k;
   
    c=k=0;
    scanf("%d",&n);
    int a[n],b[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++;}
        else{
        if(c>k)
        {
            k=c;
            
        }
        c=0;
        }
    }
    if(c>k){printf("%d",c);}
    else printf("%d",k);
    
    
    
    return 0;
}
int main(){ 
   int n,i,x,y,k,m; 
   scanf("%d",&n); 
   i=1;
   k=0; 
   m=k; 
   while(i<=n){ 
   scanf("%d %d",&x,&y); 
   if(x>=90&&x<=140&&y>=60&&y<=90){
   k+=1; 
   }else{ 
   k=0;
   }if(k>m){
   m=k;
   } 
   i=i+1;
} 
  printf("%d",m); 
  return 0; 
}
int main()
{
	int n;
	scanf("%d",&n);
	int sz[100][2],sz2[100];
	int i,j,flag=0,e,max;
	for(i=0;i<n;i++)
    {
		for(j=0;j<2;j++)
		{
			scanf("%d",&sz[i][j]);
		}
	}
    for(i=0;i<n;i++)
    {
        if(sz[i][0]>=90&&sz[i][0]<=140&&sz[i][1]>=60&&sz[i][1]<=90)
		{
			flag=flag+1;
		}
		else
		{
			flag=0;
		}
		sz2[i]=flag;
	}
	for(i=0;i<n-1;i++)
	{
		if(sz2[i]>sz2[i+1])
		{
			e=sz2[i+1];
			sz2[i+1]=sz2[i];
			e=sz2[i];
		}
	}
	max=sz2[n-1];
	printf("%d",max);
	return 0;
}