semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,i,k,j,e;
	k=0;
	int shou[100],shu[100];
	int sz[100];
	for(j=0;j<100;j++){
		sz[j]=0;
	}
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&(shou[i]),&(shu[i]));
		if(shou[i]>=90&&shou[i]<=140&&shu[i]>=60&&shu[i]<=90){
			sz[k]=sz[k]+1;
		}
		else{k=k+1;
		}
	}
	for(j=0;j<k;j++){
		if(sz[j]>sz[j+1]){
			e=sz[j];
			sz[j]=sz[j+1];
			sz[j+1]=e;
		}
	}
	printf("%d",sz[k]);
	return 0;

	
	


}
int main()
{
	int n,a[100],b[100],c[100],s=0,i,d=0;
	cin >> n;
	for(i=1;i<=n;i++)
	{
		cin >> a[i] >> b[i];
		if(a[i]>=90 && a[i]<=140 && b[i]>=60 && b[i]<=90)
		{
			s = s + 1;
			c[i] = s;
		}
		else 
		{
			s = 0;
			c[i]=0;
		}
		if(d<=c[i]) d=c[i];
	}
    cout << d << endl;
return 0;
}
int main()
{
   int n,x,y,i=1,k=0,l=0;
   scanf("%d",&n);
   while(i<=n)
   {
      scanf("%d%d",&x,&y);
      if(x>=90&&x<=140&&y>=60&&y<=90)
         k++;
      else
         k=0;
      if(k>l)
         l=k;
      i++;
   }
   printf("%d",l);
   scanf("%d",&n);
   return 0;
}
int main(){
	int i,n;
	scanf("%d",&n);
	int a[100],b[100];
	for(i=0;i<n;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	int c[100];
	for(i=0;i<n;i++){
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90){
			c[i]=1;
		}else{
			c[i]=0;
		}
	}
	int t=0,q=0;
	int d[100]={0};
	for(i=0;i<n;i++){
		if(c[i]==1){
			t++;
		}
		if((c[i]!=c[i+1]||i==n-1)&&c[i]!=0){
			d[q]=t;
			q++;
			t=0;
		}
	}
	int w=d[0];
	for(i=0;i<q;i++){
		if(w<d[i]){
			w=d[i];
		}
	}
	printf("%d",w);
	return 0;
}
int main()
{
	int n,max[100],min[100];
	int i,j,t=0,tr=0;
	scanf("%d",&n);
	for(i=0,j=0;i<n;i++)
	{
		scanf("%d %d",&max[i],&min[i]);
		if(max[i]<=140&&max[i]>=90&&min[i]>=60&&min[i]<=90)
		{
			t++;
		}
		else
			t=0;
		if(t>=tr)
			tr=t;
	}
	printf("%d",tr);
	return 0;
}
int main()
{
int n,a,b,i,j,t;
j=0;
t=0;
scanf("%d",&n);
for(i=1;i<=n;i=i+1)
   {
    scanf("%d %d",&a,&b);
    if((a>=90&&a<=140)&&(b>=60&&b<=90))
        {
         j=j+1;
         }
    else
        {
         if(t<j){t=j;j=0;}
         else {j=0;}
        }
   }
if(t<j){t=j;}
printf("%d",t);
return 0;
}
int main()
{
int n,i,s,l;
int a,b;
scanf("%d",&n);
s=0;
l=0;
for(i=1;i<=n;i++)
{
	scanf("%d%d",&a,&b);
	if(a>=90&&a<=140&&b>=60&&b<=90)
	{
		s=s+1;
	}
	else
	{
		if(s>=l)
		{
			l=s;
			s=0;
		}
		else
		{
		    s=0;
		}
	}
}
if(l>=s)
printf("%d\n",l);
else
printf("%d\n",s);
}
int main(){
    int n,r,i,p,q;
    int high[100];
    int low[100];
    r=0;
    q=0;
    p=-1;
    scanf("%d",&n);
    for(i=0;i<n;i++){
           scanf("%d %d",&high[i],&low[i]);
    }
    for(i=0;i<n;i++){
           if(high[i]>=90&&high[i]<=140&&low[i]>=60&&low[i]<=90){
                         if(i-p==1){
                                  q=q+1;
                                  p=i;
                         }
                         
           }else{ 
                   if(r<q){
                            r=q;
                   }
                   q=0;
                   p=i;
           }
           if(i==n-1) {
                            if(r<q){
                                r=q;
                            }
           }
    }
    printf("%d",r);
    return 0;
}
int v=0,r=0;
void fy()
{
     int a,b;
     cin>>a>>b;
     if(a>=90&&a<=140&&b>=60&&b<=90)
     r++;
     else {
          if(r>v)
          v=r;
          r=0;
          }
}
int main()
{
    int a,i,b,z,t=0,c=0,d[4]={0};
    double m,n=0;
    char s[100];
    cin>>b;
    for(i=0;i<b;i++)
    {
       fy();
    }
    cout<<(v>r?v:r)<<endl;
    return EXIT_SUCCESS;
}
int main()
{
    int n;
    cin>>n;
    int a[n],b[n],c[n],d[n];
    for(int i=0;i<n;i++)
    {
            cin>>a[i]>>b[i];
            if(a[i]<141&&a[i]>89&&b[i]<91&&b[i]>59)
            c[i]=1;
            else
            c[i]=0;
            }
            for(int m=0;m<n;m++)d[m]=0;
           if(c[0]==1)d[0]=1;
           else 
           d[0]=0;
           int l=0;
           for(int k=1;k<n;k++)
           
           {
                   
              if(c[k]==1&&c[k-1]==1) d[l]++;
              if(c[k]==1&&c[k-1]==0) {l++;d[l]++;}              
              if(c[k]==0&&c[k-1]==1)  l++;
              if(c[k]==0&&c[k-1]==0)    l++; 
                   }
                   for(int q=1;q<n;q++)
                   {if(d[q]>d[0])d[0]=d[q];}
                 cout<<d[0]<<endl;
    
return 0;
}
//*************************
//     ????
//     ???  1300062709
//    2013.10.28
//**************************
int main()
{
	int n, i, shousuo[101], shuzhang[101], t=0, max;
	int shijian[101];
	cin>>n;

	for(i=1;i<=n;i++)
	{
		cin>>shousuo[i]>>shuzhang[i];
	}
	for(i=1;i<=n;i++)
	{
		if((shousuo[i]>=90)&&(140>=shousuo[i])&&(shuzhang[i]>=60)&&(90>=shuzhang[i]))
		{
			t++;
			shijian[i]=t;
		}
	    else 
		{	
			shijian[i]=t=0;
		}
	}
	max=shijian[1];
    for(i=1;i<=n;i++)
	{
	 if(max<shijian[i])	
		max=shijian[i];
	}
	
	 printf("%d",max);
	return 0;
}
void main()
{
	int a[100],b[100],c[100],n,i,l=0,j,h,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(i==0)
			h=0;
		if(i==n-1)
		{
			if(a[i]<=140&&a[i]>=90&&b[i]<=90&&b[i]>=60)
			{
				h++;
				c[l]=h;
				l++;
			}
		}
		else
		{
		if(a[i]<=140&&a[i]>=90&&b[i]<=90&&b[i]>=60)
			h++;
		else
		{
			c[l]=h;
			h=0;
			l++;
		}
		}
	}
	for(i=0;i<l;i++)
	{
		if(c[i]>max)
			max=c[i];
	}
	printf("%d",max);
}
int main()
{
	int n;
	int temp=0;
	scanf("%d",&n);
	int count=0;
	int sz[100][2];
	int pd[100]={0};
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<2;j++)
		{
			scanf("%d",&sz[i][j]);
		}
	}
	for(int k=0;k<n;k++)
	{
		if((sz[k][0]>=90)&&(sz[k][0]<=140)&&(sz[k][1]>=60)&&(sz[k][1]<=90))
		{
			pd[k]=1;
		}
		
	}
	for(int l=0;l<n;l++)
	{  
		if(pd[l]==1)
		{
			count++;
		}
		if(pd[l]==0)
		{
			if(count>temp)
			{
               temp=count;
			}
		    
		    count=0;
		}
	}
	if(count>temp)
	{
		temp=count;
	}
	printf("%d",temp);


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

	printf("%d\n",k);

	
	return 0;

}
int main() {
	int  a[101],b[101],c[101],n,i,e=1,f=0,g,h;
	scanf("%d",&n);
	
	for (i=1;i<=n;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	for(i=1;i<=101;i++){
		c[i]=0;
	}
	for (i=1;i<=n;i++){
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=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 i,x,c,n;
	int sz[200];
	x=0;
	c=0;
	scanf("%d",&n);
	for(i=1;i<=(n*2);i++){
		scanf(" %d",&sz[i]);
	}
	for(i=1;i<=(n*2-1);i+=2){
		if(sz[i]>=90&&sz[i]<=140&&sz[(i+1)]<=90&&sz[(i+1)]>=60){
			x++;
		}else{
			if(x>=c){
			c=x;
		x=0;
		}
			x=0;
	}
	}
	if(x>=c){
			c=x;
		x=0;
	}
		printf("%d", c);
		return 0;

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

}
int main(){
int n,b,sz[100],s[100],z[100];
scanf("%d",&n);
int a=0;
int k=0;
for(int k=0;k<100;k++){
z[k]=0;
}
for(int i=0;i<n;i++){
	scanf("%d %d",&sz[i],&s[i]);
	if(sz[i]<=140&&sz[i]>=90&&s[i]<=90&&s[i]>=60){z[k]++;
	}else{
	k++;
	}
}
for(int k=0;k<100;k++){if(z[k]>z[k+1]){
		b=z[k+1];
		z[k+1]=z[k];
		z[k]=b;
	}
}
printf("%d",z[99]);
return 0;
}
int main()
{
	int n;
	cin>>n;
	int high[101], low[101], time = 0, continuous[101], max = 0;
	for(int i = 1; i <= n; i ++)
	{
		cin>>high[i]>>low[i];
	}
	for(int j = 1; j <= n; j++)
	{
		if(high[j] >= 90 && high[j] <= 140 && low[j] >= 60 && low[j] <= 90)
		{
			time ++;
			continuous[j] = time;
		}
		else
			continuous[j] = time = 0;
	}
	max = continuous[1];
	for (int k = 1; k <= n; k++)
	{
		if(max < continuous[k])
			max = continuous[k];
	}
	cout<<max<<endl;
	return 0;
}
int main(){
	int i,n,a[101],b[101],t=0,max=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
	scanf("%d%d",&a[i],&b[i]);
	}
	for(i=0;i<n;i++){ 
		if((a[i]>=90&&a[i]<=140)&&(b[i]>=60&&b[i]<=90)){
		t++;
		}
		else{
			t=0;
		}
		if(t>max){
		max=t;
		}
	}
	printf("%d",max);
return 0;
}
int main(){
	int a[100][2],b[100];
	int i,j;
	int h=0;
	int n;
	int k=0;
	int e;
	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)){
			h+=1;
		}else{
			b[k]=h;
			k+=1;
			h=0;
		}
	}
	if((a[n-1][0]>=90)&&(a[n-1][0]<=140)&&(a[n-1][1]>=60)&&(a[n-1][1]<=90)){
		b[k-1]=h;
	}
	for(i=0;i<k-1;i++){
		if(b[i]>b[i+1]){
			e=b[i+1];
			b[i+1]=b[i];
			b[i]=e;
		}
	}
	printf("%d",b[k-1]);
	return 0;
}
int main()
{
    int n,a=0,b=0,c;
    scanf("%d",&n);
    int num[n][2],dnum[n];
    for(int i=0;i<n;i++)
    {
        scanf("%d",&num[i][0]);
        scanf("%d",&num[i][1]);
    }
    
    for(int i=0;i<n;i++)
    {
        if(num[i][0]<=140&&num[i][0]>=90&&num[i][1]>=60&&num[i][1]<=90)
        {
            a++;
        }
        else
        {
            
            dnum[b]=a;
            b++;
            a=0;
        }
        
    }
   dnum[b]=a;

    for(int i=0;i<b;i++)
    {
        for(int j=1;j<b+1-i;j++)
        {
            if(dnum[j-1]>dnum[j])
            {
                c=dnum[j-1];
                dnum[j-1]=dnum[j];
                dnum[j]=c;
            }
        }
    }
    
         printf("%d",dnum[b]);
    return 0;
}
int main()
{
	int a,b,T,i,j=0,k,K=0;
	scanf("%d",&T);
	
    for(i=0;i<T;i++)
    {
       scanf("%d%d",&a,&b);
	   if(b<=90&&b>=60&&a>=90&&a<=140)
	   { 
		   j=j+1;
		   k=j;
          if (K<k)
		  { K=k;
		   }
	   }
	   else 
	   {
		   
	      k=0;
		  j=0;
	   }
	}
	printf("%d",K);
}
int main()
{
	int m,n,x,i,b;
	int a=0;
	int c=0;
	scanf("%d\n",&x);
    for(i=1;i<=x;i++)
	{
		scanf("%d %d",&m,&n);
		if((m>=90)&&(m<=140)&&(n>=60)&&(n<=90))
	{
			a++;
		b=a;}
		else
		{a=a;
		b=a;
		if(b!=0)
		{
			break;
		}
	}
	}
	int y=i;
    for(i=y;i<x;i++)
	{
		scanf("%d %d",&m,&n);
		if((m>=90)&&(m<=140)&&(n>=60)&&(n<=90))
	{
			c++;}
		else c=0;
		if(c>b)
		{b=c;}
	}
	printf("%d",b);
	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;
	for (i=1;i<n;i++)
		if(MAX<*(a+i))
			MAX=*(a+i);
		return MAX;
}
int main(){
   int n,d,x,i,j,sz[100],k[100],q;
   scanf("%d",&n);
   for(i=0;i<n;i++)
   {
	  scanf("%d %d",&d,&x);
	  if((d>=90)&&(d<=140)&&(x>=60)&&(x<=90))
        sz[i]=1;
	  else sz[i]=0;
	  }
   for(i=0;i<n;i++){
	   if(sz[i]==1){
            k[i]=1;
	   for(j=i+1;j<n;j++){
		   if(sz[j]==1)
            k[i]++;
		   else break;
	   }
   }
else k[i]=0;
   }
   q=k[0];
   for(i=1;i<n;i++){
	   if(k[i]>q)
		   q=k[i];
	   }
	   printf("%d",q);
	return 0;
}
int main(){
    int n,i,x=0,c=0;
    int num[100];
    scanf("%d",&n);
    struct xueya{
        int a;
        int b;
    }xy[100];
    for(i=0;i<n;i++){
        scanf("%d %d",&xy[i].a,&xy[i].b);
    }
    for(i=0;i<n-1;i++){
        if(90<=xy[i].a&&xy[i].a<=140&&60<=xy[i].b&&xy[i].b<=90){
            x++;
        }else{
            num[c]=x;
            c++;
            x=0;
        }
    }
     
        if(90<=xy[n-1].a&&xy[n-1].a<=140&&60<=xy[n-1].b&&xy[n-1].b<=90){
            x++;
			num[c]=x;
            c++;
        }else{
            num[c]=x;
            c++;
            x=0;
        }
    
    int d;
    for(i=0;i<c-1;i++){
        for(i=0;i<c-1;i++){
            if (num[i]>num[i+1]){
            d=num[i+1];
            num[i+1]=num[i];
            num[i]=d;
            }
        }
    }
    printf("%d\n",num[c-1]);
return 0;
}
int main(){
    int x,a,b;
	scanf("%d",&x);
	int y=0;
	int max=0;
	for(int i=0;i<x;i++){
	scanf("%d%d",&a, &b);
	if(a>=90&&a<=140&&b>=60&&b<=90){y++;
	if(y>=max){max=y;}
	}

	else{y=0;}
	}
	printf("%d",max);
	return 0;
}
int main(){
	int n,i,j,s,t=0,m,max=0,a,b;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&a,&b);
        if(a>=90&&a<=140&&b>=60&&b<=90){
			t++;
            if(t>max){
			  max=t;
			}
		}else{
			t=0;
		}
	}printf("%d",max);
	return 0;
}
//********************************
//*???????   **
//*?????? 1300012713 **
//*???2013.10.24  **
//********************************
int main() 
{
	int m = 0, p = 0, n, a, b; // ???????m,p,????n????a????b
	cin >> n; //??????n
	for (int i = 1; i <= n; i++) //?????
	{
		cin >> a >> b; //?????a????b
		if(a >= 90 && a <= 140 && b >= 60 && b <=90) //????????
			m = m + 1; //??????
		else //??
		{
			if (p == 0) //??p???????????m
				p = m;
			else if (p > 0 && p < m) //??p??????m???m??
				p = m;
			m = 0; //m??
		}
	}
	if (p < m) //??p?m 
		p = m;
	cout << p << endl; //?????
	return 0;
}
int main()
{
    struct
    {
        int x;
        int y;
    } sz[100];
    int n,i,a=0,b=0,cs[100],max;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d%d",&sz[i].x,&sz[i].y);
        if(sz[i].x>=90&&sz[i].x<=140&&sz[i].y>=60&&sz[i].y<=90)
        {
            a+=1;
            if(i==n-1)
            {
                max=a;
            }
        }
        else
        {
            cs[b]=a;
            a=0;
            b+=1;
            if(i==n-1)
            {
                max=cs[0];
            }
        }
    }
    for(i=0;i<b;i++)
    {
            if(cs[i]>max)
            max=cs[i];            
    }
    printf("%d",max);
    return 0;
}
int main(){
	int n,ss,sz,i,sc[100],e,k;
	for(i=0;i<100;i++){
		sc[i]=0;
	}
	e=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&ss,&sz);
		if((ss>=90)&&(ss<=140)&&(sz>=60)&&(sz<=90)){
			sc[e]++;
		}
		else{
			e++;
		}
	}
	for(e=0;e<100;e++){
		for(i=0;i<99;i++){
			if(sc[i]<sc[i+1]){
				k=sc[i];
				sc[i]=sc[i+1];
				sc[i+1]=k;
			}
		}
	}
	printf("%d",sc[0]);
	return 0;
}
int main ()
{
	int n , i , a , b , t = 0 , l = 0 , k;
	cin >> n ;
	for ( i = 1 ; i <= n ; i++ )
	{
		cin >> a >> b ;
		if ( (a >= 90) && (a <= 140) && (b >= 60) && (b <= 90) )
		{
			t = t + 1;
			if ( i < n )
			continue ;
			else if ( t > l )
			{
				l = t ;
				break ;
		   	}
			else
			break ;
		}
		else 
		{
			if ( t > l )
			{
				l = t ;
				t = 0 ;
			}
			else 
				t = 0 ;
		}
	}
	cout << l << endl ;
	return 0 ;
}
int main()
{
    int n;
    
    scanf("%d", &n);
    
    int *normal = (int *) malloc(sizeof(int) * n);
    
    int hi, lo;
    
    int i;
    
    int max = 0;
    int len;
    int previous = -1;
    
    for(i = 0; i <= n - 1; i++)
    {
          scanf("%d %d", &hi, &lo);
          if( (lo >= 60) && (lo <= 90) && (hi >= 90) && (hi <= 140) )
          {}
          else
          {
              len = i - previous - 1;
              previous = i;
              if(len > max)
                     max = len;
          }
    }
    
    i = n;
    len = i - previous - 1;
    if(len > max)
                     max = len;
                     
    printf("%d", max);
    
    
   
    return 0;
}
int main(){
	int n,a=0;
	int ew[100][2];
	int z[100];
	int s[100];
	int i,j,k=0;
	int max=0;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++){
		scanf("%d%d",&ew[i][0],&ew[i][1]);
		if(((ew[i][0]<=140)&&(ew[i][0]>=90))&&((ew[i][1]<=90)&&(ew[i][1]>=60))){
			z[i]=1;
		}
		else
			z[i]=0;


	}
//	for(i=0;i<=n-1;i++){
//		printf("%d",z[i]);
//	}
	s[0]=0;
	for(i=0;i<=n-1;i++)
	{
	
		if(z[i]==1){
			s[k]++;
		}
		else{
			k++;
			s[k]=0;
		}
	
	}
//	printf("%d",s[1]);
	for(i=0;i<=k;i++){
		if(s[i]>=max){
			max=s[i];
		}
	}
	printf("%d",max);


	return 0;
}
int main()
{	
	int n=0;
	scanf("%d",&n);
	int i=0,hour=0,j=0,max=0;
	int a[100]={0},b[100]={0},c[100]={0};
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&a[i],&b[i]);
	}
	for(i=0;i<n;i++)
	{
		if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90)
			c[i]=1;
	}
	for(i=0;i<n;i++)
	{
		if(c[i]==1)
			for(j=i;j<n;j++)
			{
				if(c[j]==1)
					hour++;
				else
					break;
			}
		if(hour>max)
			max=hour;
		hour=0;

	}
	printf("%d",max);
	return 0;
}
int main(){
	int x,y;
	int n;cin >> n;
	int m = 0,count = 0;
	while(n--){
		cin >> x >> y;
		if(x >= 90 && x <= 140 && y >= 60 && y <= 90){
			count ++;
			m = max(m,count);
		} else {
			count = 0;
		}
	}
	cout << m << endl;
	return 0;
}
int main(){
    int n,i,j,c=0;
    scanf("%d",&n);
    int SZ[n][2];
    int a[1000]={0};
    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){
            a[c]=a[c]+1;
        }else{
            c=c+1;
        }
    }  
    int tmp=0;
    for(i=0;i<n;i++){
        for(j=n-1;j>i;j--){
            if(a[i]>a[j]){
                tmp=a[j];
                a[j]=a[i];
                a[i]=tmp;
            }
        }
    }
    printf("%d",a[n-1]);
    return 0;
}
int main()
{
	int n,i,max=0;
	int x=0;
	int sz[100],sc[100];
	scanf("%d",&n);

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


		for(i=0;i<n;i++)
		{
             if(sz[i]>=90&&sz[i]<=140&&sc[i]>=60&&sc[i]<=90){
		     x=x+1;
	
			 }
			 else{
		        if(x>max){
				 max=x;
				 x=0;
				}
				else{
					x=0;
				}
			
			 }
			 
		}
 
		if(x>max){
			max=x;
		}

        printf("%d",max);
	
	return 0;
}
int main()
{
    int n, ai, bi, sum=0, num[100];
    cin >> n;
    for (int j=0; j<n; j++)
    {
        cin >> ai >> bi;
        if(ai>=90 & ai<=140 & bi>=60 & bi<=90  )
            sum = sum + 1;
        
        else 
            sum = 0;
       
        num[j] = sum;    
    }
   
     if(n<=1) 
          cout << sum << endl;
     else
       {  for (int j=1; j<n; j++)
        {
            if(num[j] < num[j-1])
                num[j]=num[j-1];
        }
          cout << num[n-1] << endl;
        }

    return 0;

}
int main()
{
    int n,i,t=0,s=0,h,l;
    scanf("%d",&n);
    int ss[100],sz[100],xs[100]={0};
	xs[0]=0;
    for(i=0;i<n;i++){
        scanf("%d %d",&(ss[i]),&(sz[i]));
        if((ss[i]<=140)&&(ss[i]>=90)&&(sz[i]<=90)&&(sz[i]>=60)){
           s++;
           xs[t]=s;}
        else {s=0;
              t++;}
              }
    l=t;
    h=xs[0];
    for(t=0;t<=l;t++){
        if(h<(xs[t]))
        h=xs[t];
        }              
    printf("%d",h);      
    return 0;
}
int main()
{
	int n,a[100],b[100],i;
	scanf("%d",&n);
	int max = 0, cur = 0;
	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) {
			cur++;
		}
		else cur = 0;
		if (cur > max) max = cur;
	}

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

}
//
//  main.cpp
//  10.15 homework
//   ????

//  Created by airjcy on 10/8/12.
//  Copyright (c) 2012 airjcy. All rights reserved.
//



int main(int argc, const char * argv[])
{
    int n;
    cin >> n;
    int i;
    int lowPressure,highPressure;
    int maxContinueNormalHours = 0;
    int continueNormalHours = 0;
    for (i = 0; i < n; i++) {
        cin >> highPressure >> lowPressure;
        if ((highPressure >= 90)&&(highPressure <= 140)&&(lowPressure >= 60)&&(lowPressure <= 90)) {
            continueNormalHours ++;
            if (continueNormalHours > maxContinueNormalHours) {
                maxContinueNormalHours = continueNormalHours;
            }
        }
        else
            continueNormalHours = 0;
    }
    cout << maxContinueNormalHours;
}
int main()
{
	int n, i;
	int time=0, max=0;
	cin >> n;
	int a[100], b[100];
	for(i=1;i<=n;i++)
	{
		cin >> a[i] >> b[i];
	    if(a[i]>=90 && a[i]<=140 && b[i]>=60 && b[i]<=90)
		{
			time=time+1;
			if(max<time)
			{
				max=time;
			}
		}
		else
		{
			time=0;
		}
	}
	cout << max << endl;
	return 0;
}
//********************************
//*???????   **
//*????? 1200012917 **
//*???2012.10.12  **
//********************************
int main()
{
    int i, n, x, y, b = 0, t = 0;    //???????n????x????y??????b??t?????i?????
    cin >> n;                        //??n
    for(i = 1; i <= n; i++)
    {
        cin >> x >> y;
        if(((x - 90) >= 0) && ((x - 140) <= 0) && ((y - 60) >= 0) && ((y - 90) <= 0))  //??????
        {
             t = t + 1;   //????t?1????????????

        }
        else
        {
                t = 0;  //?????t??
        }
         if(b <=t)
             b = t;     //b?????????
    }
    cout << b << endl;   //??b
    return 0;
}
//***********************************
//*?????? 1300012809         **
//*???2013.10.25                **
//*???????                  **
//***********************************
int main()
{
    int n,i,time,jishu; 
	cin >> n;
	time=0;
	jishu=0;
	for (i=1;i<=n;i++)                                 //??n???
	{
		int a,b;
		cin >> a >> b ;
		if ((a<90||a>140||b<60||b>90)&&jishu<=time) jishu = time;     //?????????
		if (a>=90&&a<=140&&b>=60&&b<=90)               //??????????
		{
			time = time+1;
					}
        else 
		{
			time = 0;                                    //????????????
		}
		if (jishu<time) jishu = time;                    //???????????
	}
    cout << jishu << endl;
	return 0 ;
}
int main()
{
	int n, time = 0, i, max = 0;
	int hi, lo;

	scanf("%d", &n);
    
    for(i = 1; i <= n; i++)
	{
		scanf("%d %d", &hi, &lo);
		if( ( hi >= 90 ) * ( hi <= 140 ) * ( lo <= 90 ) * ( lo >= 60 ) == 1 )
		    time = time + 1;
        else 
        {
             if( time > max )
                 max = time;
             time = 0;
        }
        
        if( i == n && time > max)
            max = time;
                 
        
    }
     
   
    printf("%d", max);
    
    
    return 0;
    
          
 }
int main()
{
	int n,a,b,p,c;
         int d=0;
	int i=0;
	int max(int x,int y);
	scanf("%d",&n);//????n
	for(p=1;p<=n;p++)
	{
		scanf("%d %d ",&a,&b);//????
		if(90<=a&a<=140)
		{
			if(60<=b&b<=90)
			{
				i=i+1;
			}
			else
			{
				i=0;
			}
		}
		else
		{
			i=0;
		}
		c=i;
		d=max_int(d,c);
	}
	printf ("%d\n",d);
	return 0;
}
int max_int(int x,int y)
{
	int z;
	if(x>y)
	{
		z=x;
	}
	else
	{
		z=y;
	}
	return(z);
}
int main(){
	int n,i,j,a,b,k[100],m,l;
	scanf("%d",&n);
	for(i=0;i<100;i++){k[i]=0;}
	m=0;
	for(i=0;i<n;i++){
		scanf("%d%d",&a,&b);
		if((a>=90&&a<=140)&&b>=60&&b<=90){
			k[m]++;
		}
		else m++;
	}
	for(i=1;i<=m;i++){
		for(j=0;j<=m-i;j++){
			if(k[j]>k[j+1]){
				l=k[j];
				k[j]=k[j+1];
				k[j+1]=l;
			}
		}
	}
	printf("%d",k[m]);
	return 0;
}
/**
 * @file 6.cpp
 * @author ??? 1300012960
 * @date 2013-10-23
 * @description
 * ??????: ???? */
int main()
{
    int n, p1, p2, t1 = 0, t2 = 0;  // p1 p2????? ??? t1??????? t2????????
    
    cin >> n;  // ?????
    for (int j = 1; j <= n; j++)
    {
        cin >> p1 >> p2;
        if (p1 >= 90 && p1 <= 140 && p2 >= 60 && p2 <= 90)  // ?????t2+1
            t2++;
        else  // ?????0???
        {
            t1 = max(t1, t2);  // ??t1?????????
            t2 = 0;    // t2???0
        }
    }
    t1 = max(t1, t2);   // ?????????? ??????
    cout << t1;
    return 0;
}