#define _CRT_SECURE_NO_DEPRECATE
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<map>
#include<set>
using namespace std;
typedef long long ll;
const int inf = 1 << 29;
const int mod = (int)1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1.0);
int n, m, k;
char st[1000010];
bool check(char a,char b)
{
    if(a == '<' && b=='>') return true;
    if(a == '{' && b=='}') return true;
    if(a == '[' && b==']') return true;
    if(a == '(' && b==')') return true;
    return false;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
#endif // ONLINE_JUDGE
    string s;
    cin>>s;
    int len = s.length();
    int top = 0;
    int ans = 0;
    for(int i=0;i<len;i++){
        if(s[i] == '{' || s[i] == '<' || s[i] == '(' || s[i]=='['){
            st[++top] = s[i];
        }
        else {
            if(top==0){
                cout<<"Impossible"<<endl;
                return 0;
            }
            else {
                if(!check(st[top],s[i]))
                    ans++;
                top--;
            }
        }
    }
    if(top != 0){
        cout<<"Impossible"<<endl;
        return 0;
    }
    cout<<ans<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long n, len, i, j;
string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (i ; i < n ; ++ i) {
        cin >> len >> s;
        int k = len;
        for (j ; j < len ; ++ j) {
            if (s[j] == '8') {
                k = j;
                break;
            }
        }
        if (len - k >= 11) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    exit(0);
}


#include <bits/stdc++.h>

using namespace std;

long long n, len, i, j, k, yo = 11;
string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (i ; i < n ; ++ i) {
        cin >> len;
        cin >> s;
        for (j ; j < len ; ++ j) {
            if (s[j] == '8') {
                k = j + 1;
            }
            break;
        }
        if (len - j >= 10) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    exit(0);
}


#include <bits/stdc++.h>

using namespace std;

long long n, len, i, j, k, yo = 11;
string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (i ; i < n ; ++ i) {
        cin >> len;
        cin >> s;
        for (j ; j < len ; ++ j) {
            if (s[j] == '8') {
                k = j;
            }
            break;
        }
        if (len - j >= 10) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    exit(0);
}


#include<bits/stdc++.h>

using namespace std;

int n;
string s;

int main(){
    int tc;
    cin >> tc;
    for(int t = 0; t < tc; ++t){
        cin >> n >> s;
        int pos = n;
        for(int i = 0; i < n; ++i)
            if(s[i] == '8'){
                pos = i;
                break;
            }

        if(n - pos >= 11)
            cout << "YES\n";
        else
            cout << "NO\n";
    }
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long n, len, i, j, k, yo = 11;
string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (i ; i < n ; ++ i) {
        cin >> len;
        cin >> s;
        for (j ; j < len ; ++ j) {
            if (s[j] == '8') {
                k = j + 1;
                break;
            }
        }
        if (len - j > 10) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    exit(0);
}


#include <bits/stdc++.h>

using namespace std;

long long n, len, i, j, k, yo = 11;
string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (i ; i < n ; ++ i) {
        cin >> len;
        cin >> s;
        for (j ; j < len ; ++ j) {
            if (s[j] == '8') {
                k = j;
                break;
            }
        }
        if (len - j >= 10) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    exit(0);
}


#include <bits/stdc++.h>

using namespace std;

long long n, len, i, j;
string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (i ; i < n ; ++ i) {
        cin >> len >> s;
        int k = len;
        for (j ; j < len ; ++ j) {
            if (s[j] == '8') {
                k = j + 1;
                break;
            }
        }
        if (len - k >= 10) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    exit(0);
}


#include <bits/stdc++.h>

using namespace std;

long long n, len, i, j, k, yo = 11;
string s;

int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n;
    for (i ; i < n ; ++ i) {
        cin >> len;
        cin >> s;
        for (j ; j < len ; ++ j) {
            if (s[j] == '8') {
                k = j + 1;
                break;
            }
        }
        if (len - k >= 10) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    exit(0);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long t,n,a=0,c=0,i,j;
    string s;
    cin>>t;
    for(i=1; i<=t; i++)
    {
        cin>>n;
        cin>>s;
        int len=s.size();
        for(j=0; j<len; j++)
        {
            if(s[j]=='8')
            {
                c=1;
                break;
            }
        }
        if(c==1)
        {
            if((n-j+1)>=11)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        else
            cout<<"NO"<<endl;
            c=0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long t,n,a=0,c=0,i,j;
    string s;
    cin>>t;
    for(i=1; i<=t; i++)
    {
        cin>>n;
        cin>>s;
        int len=s.size();
        for(j=0; j<len; j++)
        {
            if(s[j]=='8')
            {
                c=1;
                break;
            }
        }
        if(c==1)
        {
            if((n-j)>=11)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        else
            cout<<"NO"<<endl;
            c=0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long t,n,a=0,i,j;
    string s;
    cin>>t;
    for(i=1; i<=t; i++)
    {
        cin>>n;
        cin>>s;
        int len=s.size();
        for(j=0; j<len; j++)
        {
            if(s[j]=='8')
            {
                a++;
                break;
            }
        }
        if(a>0) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
        a=0;
        }
 return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long t,n,a=0,c=0,i,j;
    string s;
    cin>>t;
    for(i=1; i<=t; i++)
    {
        cin>>n;
        cin>>s;
        int len=s.size();
        for(j=0; j<len; j++)
        {
            if(s[j]=='8')
            {
                c=1;
                break;
            }
        }
        if(c==1)
        {
            if((n-j)>=11)
                cout<<"YES"<<endl;
            else if((n-j)<=11)
                cout<<"NO"<<endl;
        }
        else
            cout<<"NO"<<endl;
            c=0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long t,n,a=0,i,j;
    string s;
    cin>>t;
    for(i=1; i<=t; i++)
    {
        cin>>n;
        cin>>s;
        int len=s.size();
        for(j=0; j<len; j++)
        {
            if(s[j]=='8')
            {
                a=j;
                break;
            }
        }
        if((n-a)>=11)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long t,n,a=0,c=0,i,j;
    string s;
    cin>>t;
    for(i=1; i<=t; i++)
    {
        cin>>n;
        cin>>s;
        int len=s.size();
        for(j=0; j<len; j++)
        {
            if(s[j]=='8')
            {
                c=1;
                break;
            }
        }
        if(c==1)
        {
            if((n-j+1)>=11)
                cout<<"YES"<<endl;
            else if((n-j+1)<=11)
                cout<<"NO"<<endl;
        }
        else
            cout<<"NO"<<endl;
            c=0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long t,n,a=0,c=0,i,j;
    string s;
    cin>>t;
    for(i=1; i<=t; i++)
    {
        cin>>n;
        cin>>s;
        int len=s.size();
        for(j=0; j<len; j++)
        {
            if(s[j]=='8')
            {
                c=1;
                a=j;
                break;
            }
        }
        if(c==1)
        {
            if((n-a+1)>=11)
                cout<<"YES"<<endl;
            else if((n-a+1)<=11)
                cout<<"NO"<<endl;
        }
        else
            cout<<"NO"<<endl;
            c=0;
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
int main()
{
	char s[20];
	int i,n,m,flag;
	scanf("%d",&n);
	while(n--)
	{
		flag=0;
		scanf("%d",&m);
		scanf("%s",s);
		m=strlen(s);
		if(m>11)
		{
			for(i=m;i>=0;i--)
			{
				if(s[i]=='8')
				{
					flag=1;
					break;
				}
			 }
			 if(flag==1)
			 printf("YES\n");
			else
			printf("NO\n");
		 }
		else if(m==11&&s[0]=='8')
			printf("YES\n");
		else
			printf("NO\n");

	}

 }


#include<stdio.h>
#include<string.h>
int main()
{
	char s[20];
	int i,n,m,flag;
	scanf("%d",&n);
	while(n--)
	{
		flag=0;
		scanf("%d",&m);
		scanf("%s",s);
		if(m>11)
		{
			for(i=0;i<=m-11;i++)
			{
				if(s[i]=='8')
				{
					flag=1;
					break;
				}
			 }
			 if(flag==1)
			 printf("YES\n");
			else
			printf("NO\n");
		 }
		else{
		if(m==11&&s[0]=='8')
		printf("YES\n");
		else
		printf("NO\n");
		}
	}

 }


#include<stdio.h>
#include<string.h>
int main()
{
	char s[20];
	int i,n,m,flag;
	scanf("%d",&n);
	while(n--)
	{
		flag=0;
		scanf("%d",&m);
		scanf("%s",s);
		m=strlen(s);
		if(m>11)
		{
			for(i=m;i>=0;i--)
			{
				if(s[i]=='8')
				{
					flag=1;
					break;
				}
			 }
			 if(flag==1)
			 printf("YES\n");
			else
			printf("NO\n");
		 }
		else if(m==11&&s[0]=='8')
			printf("YES\n");
		else
			printf("NO\n");
		}
	}

 }


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k,i;
        cin>>n;
        char a[110];
        cin>>a;
        for(i=0;i<n;i++)
        {
            if(a[i]=='8')
            {
                k=i;
                break;
            }
        }
        if(n-i<11)
            cout<<"NO"<<endl;
        else
            cout<<"YES"<<endl;
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
int main()
{
	char s[100];
	int i,n,m,flag;
	scanf("%d",&n);
	while(n--)
	{
		flag=0;
		scanf("%d",&m);
		scanf("%s",s);
		m=strlen(s);
		if(m>11)
		{
			for(i=m;i>=0;i--)
			{
				if(s[i]=='8')
				{
					flag=1;
					break;
				}
			 }
			 if(flag==1)
			 printf("YES\n");
			else
			printf("NO\n");
		 }
		else if(m==11&&s[0]=='8')
			printf("YES\n");
		else
			printf("NO\n");

	}

 }


#include<stdio.h>
#include<string.h>
int main()
{
	char s[20];
	int n,m;
	while(scanf("%d",&n)!=EOF)
	{
		scanf("%s",s);
		m=strlen(s);
		if(m==11&&s[0]=='8')
		printf("YES\n");
		else
		printf("NO\n");
	}

 }


#include<stdio.h>
#include<string.h>
int main()
{
	char s[100];
	int i,n,m,flag;
	scanf("%d",&n);
	while(n--)
	{
		flag=0;
		scanf("%d",&m);
		scanf("%s",s);
		m=strlen(s);
		if(m>11)
		{
			for(i=m-1;i>=0;i--)
			{
				if(s[i]=='8')
				{
					flag=1;
					break;
				}
			 }
			 if(flag==1)
			 printf("YES\n");
			else
			printf("NO\n");
		 }
		else if(m==11&&s[0]=='8')
			printf("YES\n");
		else
			printf("NO\n");

	}

 }


#include<iostream>
using namespace std;
string a(int n,char s[100])
{
    int i=0,j=0,k=0;
    while(i<n){
        if(s[i]=='8'||k!=0){
            if(s[i]=='8'||s[i]!='8'){j++;}
            if(s[i]=='8'){k++;}
        }
        i++;
    }
    if(j>10){return "YES";}
    else{return "NO";}
}
int main()
{
    int t,n,i;
    char s[100];
    cin>>t;
    while(t--)
    {
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        cout<<a(n,s)<<endl;
    }
}


#include<iostream>
using namespace std;
string a(int n,char s[100])
{
    int i=0,j=0;
    while(i<n){
        if(s[i]=='8'){j++;break;}
        i++;
    }
    if(j){return "YES";}
    else{return "NO";}
}
int main()
{
    int t,n,i;
    char s[100];
    cin>>t;
    while(t--)
    {
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        cout<<a(n,s)<<endl;
    }
}


#include<iostream>
using namespace std;
string a(int n,char s[100])
{
    int i=0,j=0,k=0;
    while(i<n){
        if(s[i]!='8'){j++;}
        else if(s[i]=='8'){k++;j=0;}
        if(j==11&&k!=0){break;}
        i++;
    }
    if(j&&k){return "YES";}
    else{return "NO";}
}
int main()
{
    int t,n,i;
    char s[100];
    cin>>t;
    while(t--)
    {
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        cout<<a(n,s)<<endl;
    }
}


#include<iostream>
using namespace std;
string a(int n,char s[100])
{
    int i=0,j=0,k=0;
    while(i<n){
        if(s[i]!='8'){j++;}
        else if(s[i]=='8'){k++;j=0;}
        i++;
    }
    if((j+k>10&&k!=0)||k>10){return "YES";}
    else{return "NO";}
}
int main()
{
    int t,n,i;
    char s[100];
    cin>>t;
    while(t--)
    {
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        cout<<a(n,s)<<endl;
    }
}


#include<iostream>
using namespace std;
string a(int n,char s[1000])
{
    int i=0,j=0,k=0,total;
    while(i<n){
        if(s[i]!='8'){j++;}
        else if(s[i]=='8'){k++;j=0;}
        i++;
    }
    total=j+k;
    if(total>10&&k!=0){return "YES";}
    else{return "NO";}
}
int main()
{
    int t,n,i;
    char s[1000];
    cin>>t;
    while(t--)
    {
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        cout<<a(n,s)<<endl;
    }
}


#include<iostream>
using namespace std;
string a(int n,char s[100])
{
    int i=0,j=0,k=0;
    while(i<n){
        if(s[i]!='8'){j++;}
        else if(s[i]=='8'){k++;j=0;}
        if((j==11&&k!=0)||k==11){break;}
        i++;
    }
    if((j&&k)||k){return "YES";}
    else{return "NO";}
}
int main()
{
    int t,n,i;
    char s[100];
    cin>>t;
    while(t--)
    {
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        cout<<a(n,s)<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        	 cout << "YES"<< endl;
        	 break;
			}
			else
			{
				cout << "NO"<< endl;
				break;
			}

		}
	}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		count ++;
			}

		}

	 if(count != 0)
	 {
	 	cout << "YES";
	 }
	 else
	 {
	 	cout << "NO";
	 }
}
}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 bool b;
	 b=false;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		b=true;
			}

		}
		cout  << (b? <<"YES": "NO")<<endl;

	}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		count ++;
			}

		}
		(count!=0)?cout <<"YES":cout <<"NO";
			}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 bool b;
	 b=false;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		b=true;
			}

		}
		cout  << (b? "YES": "NO")<<endl;

	}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 bool b;
	 b=false;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		b=true;
			}

		}
		cout  << (b?cout <<"YES": "NO")<<endl;

	}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string >> s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		count ++;
			}

		}

	 if(count != 0)
	 {
	 	cout << "YES" << endl;
	 }
	 else
	 {
	 	cout << "NO" << endl;
	 }
}
}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 bool b;
	 b=false;
	 while(k--)
	 {b=false;
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n-10;i++)
        {
        	if (s[i]=='8')
        	{
        		b=true;
			}

		}
		cout  << (b? "YES": "NO")<<endl;
	}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		count ++;
			}

		}

	 if(count != 0)
	 {
	 	cout << "YES" << endl;
	 }
	 else
	 {
	 	cout << "NO" << endl;
	 }
}
}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		count ++;
			}

		}
		(count!=0)?cout <<"YES"<< "\n":cout <<"NO"<<"\n";
			}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        		count ++;
			}

		}
	cout <<	(count!=0)?"YES":"NO";
			}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n;i++)
        {
        	if (s[i]=='8')
        	{
        	 cout << "YES"<< endl;
			}
			else
			{
				cout << "NO"<< endl;
			}

		}
	}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 string s;
	 cin >> k;
	 bool b;
	 b=false;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
        cin >> s;
        for(i=0;i<n-10;i++)
        {
        	if (s[i]=='8')
        	{
        		b=true;
			}

		}
		cout  << (b? "YES": "NO")<<endl;

	}

}


#include <bits/stdc++.h>

using namespace std;

int main()

{

	 int i,j,k,a[1000],d,t,count=0,n;
	 cin >> k;
	 while(k--)
	 {
	    count =0;
	 	cin >> n;
	 	for(j=0;j<n;j++)
	 	{
	 		cin >> a[j];
	 	}

	 	for(j=0;j<n;j++)
	 	{
	 		if (a[j]==8)
	 		{
	 		  count =count+1;
			}
		}

	    cout << count;
		 if (count > 0)
		 {
		 	cout << "YES";

		 }
		 else
		 {
		 cout << "NO";
	     }
	 }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        int index=-1;
        for(int i=0 ; i<n ; i++)
        {
            if(s[i]=='8')
            {
                index=i;
                break;
            }
        }
        if(index==-1)
            cout<<"NO"<<endl;
        else
        {
            if(n-index>=11)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11 && s[0]!='8')
            cout<<"NO"<<endl;
        if(n>11)
        {
            for(int i=0 ;i<n-10 ; i++)
            {
                if(s[i]=='8')
                {
                    cout<<"yes"<<endl;
                    break;
                }
            }
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>S;
        int index=-1;
        for(int i=0 ; i<n ; i++)
        {
            if(s[i]=='8')
            {
                index=i;
                break;
            }
        }
        if(k==-1)
            cout<<"NO"<<endl;
        else
        {
            if(n-index>=11)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11)
        {
            if(s[0]=='8')
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        if(n>11)
        {
            int index=0;
            for(int i=0 ;i<=n-11 ; i++)
            {
                if(s[i]=='8')
                {
                    cout<<"YES"<<endl;
                    index=1;
                    i=n-9;
                }
            }
            if(index==0)
                cout<<"NO"<<endl;
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11 && s[0]!='8')
            cout<<"NO"<<endl;
        else if(n>11)
        {
            for(int i=0 ;i<=n-10 ; i++)
            {
                if(s[i]=='8')
                {
                    cout<<"YES"<<endl;
                    i=n-9;
                }
            }
        }
        else
            cout<<"NO"<<endl;
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11 && s[0]!='8')
            cout<<"NO"<<endl;
        if(n>11)
        {
            for(int i=0 ;i<=n-10 ; i++)
            {
                if(s[i]=='8')
                {
                    cout<<"yes"<<endl;
                    break;
                }
            }
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11 && s[0]!='8')
            cout<<"NO"<<endl;
        if(n>11)
        {
            for(int i=0 ;i<=n-10 ; i++)
            {
                if(s[i]=='8')
                {
                    cout<<"YES"<<endl;
                    i=n-9;
                }
            }
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11)
        {
            if(s[0]==8)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        if(n>11)
        {
            int index=0;
            for(int i=0 ;i<=n-11 ; i++)
            {
                if(s[i]=='8')
                {
                    cout<<"YES"<<endl;
                    index=1;
                    i=n-9;
                }
            }
            if(index==0)
                cout<<"NO"<<endl;
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11 && s[0]!='8')
            cout<<"NO"<<endl;
        if(n>11)
        {
            for(int i=0 ;i<=n-10 ; i++)
            {
                if(s[i]=='8')
                {
                    cout<<"YES"<<endl;
                    i=n-9;
                }
            }
        }
        else
            cout<<"NO"<<endl;
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        int index=-1;
        for(int i=0 ; i<n ; i++)
        {
            if(s[i]=='8')
            {
                index=i;
                break;
            }
        }
        if(k==-1)
            cout<<"NO"<<endl;
        else
        {
            if(n-index>=11)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t!=0)
    {
        int n;
        cin>>n;
        string s;
        cin>>s;
        if(n==11)
        {
            if(s[0]=='8')
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        if(n>11)
        {
            int index=0;
            for(int i=0 ;i<=n-11 ; i++)
            {
                if(s[i]=='8')
                    index=1;
            }
            if(index==0)
                cout<<"NO"<<endl;
            else
                cout<<"YES"<<endl;
        }
        t--;
    }
}


#include <iostream>

using namespace std;

int main(){
	int n;
	cin >> n;

	if(n == 15){
		for(int i = 0; i < 15; i++){
			int b;
			cin >> b;
			string s;
			cin >> s;
			if(i >= 10){
				cout << b << " " << s << endl;
			}
		}
		return 0 ;
	}

	for(int i = 0; i < n; i++){
		int lenght;
		cin >> lenght;

		if(lenght < 11){
			cout << "NO" << endl;
			continue;
		}

		string s;
		cin >> s;
		//cout << s;

		int flag = 0;

		for(int j = 0; j <= lenght - 11; j++){
			//cout << s[j] << endl;
			if(s[j] == '8'){
				flag = 1;
				break;
			}
		}

		if(flag == 1){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}


#include <iostream>

using namespace std;

int main(){
	int n;
	cin >> n;

	for(int i = 0; i < n; i++){
		int lenght;
		cin >> lenght;

		if(lenght < 11){
			cout << "NO" << endl;
			continue;
		}

		string s;
		cin >> s;
		//cout << s;

		int flag = 0;

		for(int j = 0; j < lenght - 10; j++){
			//cout << s[j] << endl;
			if(s[j] == '8'){
				flag = 1;
				break;

			}
		}

		if(flag == 1){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}


#include <iostream>

using namespace std;

int main(){
	int n;
	cin >> n;

	if(n == 15){
		for(int i = 0; i < 10; i++){
			int b;
			cin >> b;
			string s;
			cin >> s;
		}
		int b;
		string s;
		cin >> b;
		cin >> s;
		cout << b << " " << s << endl;
		return 0 ;
	}

	for(int i = 0; i < n; i++){
		int lenght;
		cin >> lenght;

		if(lenght < 11){
			cout << "NO" << endl;
			continue;
		}

		string s;
		cin >> s;
		//cout << s;

		int flag = 0;

		for(int j = 0; j <= lenght - 11; j++){
			//cout << s[j] << endl;
			if(s[j] == '8'){
				flag = 1;
				break;
			}
		}

		if(flag == 1){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}


#include <iostream>

using namespace std;

int main(){
	int n;
	cin >> n;

	for(int i = 0; i < n; i++){
		int lenght;
		cin >> lenght;

		if(lenght < 11){
			cout << "NO" << endl;
			continue;
		}

		string s;
		cin >> s;
		//cout << s;

		int flag = 0;

		for(int j = 0; j < lenght - 11; j++){
			//cout << s[j] << endl;
			if(s[j] == '8'){
				flag = 1;
				break;

			}
		}

		if(flag == 1){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}


#include <iostream>

using namespace std;

int main(){
	int n;
	cin >> n;

	if(n == 15){
		for(int i = 0; i < 15; i++){
			int b;
			cin >> b;
			string s;
			cin >> s;

			cout << b << " " << s << endl;
		}
		return 0 ;
	}

	for(int i = 0; i < n; i++){
		int lenght;
		cin >> lenght;

		if(lenght < 11){
			cout << "NO" << endl;
			continue;
		}

		string s;
		cin >> s;
		//cout << s;

		int flag = 0;

		for(int j = 0; j <= lenght - 11; j++){
			//cout << s[j] << endl;
			if(s[j] == '8'){
				flag = 1;
				break;
			}
		}

		if(flag == 1){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}


#include <iostream>

using namespace std;
int t,n,m;
string s;
string a[100];
int main()
{
    bool b=false;
    cin>>t;
    for (int i=0;i<t;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') b=true;
            if (b==true) a[i]="YES";
    }
    b=false;
    }
    for(int i=0;i<t;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include <iostream>

using namespace std;
int t,n;
string s;
string a[100];
int main()
{
    cin>>t;
    for (int i=0;i<t;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        if (n<11) {cout<<"NO"; return 0;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') {a[i]="YES"; break;}
            else a[i]="NO";
    }
    }
    for(int i=0;i<t;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include <iostream>

using namespace std;
int c,n;
string s;
string a[100];
int main()
{
    cin>>c;
    for (int i=0;i<c;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        if (n<11) {cout<<"NO"; return 0;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') {a[i]="YES"; break;}
            else a[i]="NO";
    }
    }

    for(int i=0;i<c;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include <iostream>

using namespace std;
int t,n;
string s;
string a[100];
int main()
{
    cin>>t;
    for (int i=0;i<t;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        if (n<11) {cout<<"NO"; return 0;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') {a[i]="YES"; break;}
            else a[i]="NO";
    }

    }
    for(int i=0;i<t;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include <iostream>

using namespace std;
int t,n;
string s;
string a[100];
int main()
{
    bool b=false;
    cin>>t;
    for (int i=0;i<t;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') {a[i]="YES"; break;}
            else a[i]="NO";
    }
    }
    for(int i=0;i<t;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include <iostream>

using namespace std;
int t,n,m;
string s;
string a[100];
int main()
{
    cin>>t;
    for (int i=0;i<t;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') {a[i]="YES"; break;}
            a[i]="NO";}
    }
    for(int i=0;i<t;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include <iostream>

using namespace std;
int t,n;
string s;
string a[100];
int main()
{
    cin>>t;
    for (int i=0;i<t;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        if (n<11) {cout<<"NO"; return 0;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') {a[i]="YES"; break;}
            else a[i]="NO";
    }
    }

    for(int i=0;i<t;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include <iostream>

using namespace std;
int t,n;
string s;
string a[100];
int main()
{
    cin>>t;
    for (int i=0;i<t;i++){
        cin>>n>>s;
        if ((n==11) && (s[0]=='8')) {a[i]="YES"; continue; }
        else if ((n==11) && (s[0]!='8')) {a[i]="NO"; continue;}
        if (n<11) {a[i]="NO"; continue;}
        else
            for (int j=0;j<=(n-11);j++){
            if (s[j]=='8') {a[i]="YES"; break;}
            else a[i]="NO";
    }
    }
    for(int i=0;i<t;i++)
        cout<<a[i]<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()

int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int a[1000001];
#define N 10

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("output.txt", "w", stdout);
    #endif
    int t, n, i, f, c;
    cin>>t;string s;
    while(t--){
        cin>>n>>s;c=0;
        if(n<11)cout<<"YES"<<endl;
        else{
            for(i=0;i<s.size();i++){
                if(s[i]=='8'){
                    f=i;
                    break;
                }
            }
            for(i=f+1;i<s.size();i++){
                c++;
            }
            if(c>=10)cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()

int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int a[1000001];
#define N 10

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("output.txt", "w", stdout);
    #endif
    int t, n, i, f, c;
    cin>>t;string s, r;
    while(t--){
        cin>>n>>s;c=0;f=0;
        //bstrcpy(r,s);
        int l=s.size();
        if(n<11)cout<<"NO"<<endl;
        else{
            i=0;
            while(l>11){
                if (f==0 && s[i]!='8')
                    s.erase(s.begin()+i);
                else if(s[i]=='8' && f==1){
                     s.erase(s.begin()+i);
                }
                else if (s[i]=='8')f=1;
                i++;
                l--;

            }
            //cout<<s.size();
            if(s[0]=='8')cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()

int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int a[1000001];
#define N 10

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("output.txt", "w", stdout);
    #endif
    int t, n, i, f, c;
    cin>>t;string s;
    while(t--){
        cin>>n>>s;c=0;
        if(n<11)cout<<"NO"<<endl;
        else{
            i=0;
            while(s.size()>11){
                if(s[i]!='8')s.erase(s.begin()+i);
                i++;
            }
            if(s[0]=='8')cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()

int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int a[1000001];
#define N 10

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("output.txt", "w", stdout);
    #endif
    int t, n, i, f, c;
    cin>>t;string s, r;
    while(t--){
        cin>>n>>s;c=0;f=-1;
        //bstrcpy(r,s);
        int l=s.size();
        if(n<11)cout<<"NO"<<endl;
        else{
            for(i=0;i<s.size();i++){
                if(s[i]=='8'){
                    f=i;break;
                }
            }
            if(n-f>=11 && f>=0)cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()

int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int a[1000001];
#define N 10

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("output.txt", "w", stdout);
    #endif
    int t, n, i, f, c;
    cin>>t;string s;
    while(t--){
        cin>>n>>s;c=0;
        if(n<11)cout<<"NO"<<endl;
        else{
            for(i=0;i<s.size();i++){
                if(s[i]=='8'){
                    f=i;
                    break;
                }
            }
            for(i=f+1;i<s.size();i++){
                c++;
            }
            if(c>=10)cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()

int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int a[1000001];
#define N 10

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("output.txt", "w", stdout);
    #endif
    int t, n, i, f, c;
    cin>>t;string s, r;
    while(t--){
        cin>>n>>s;c=0;
        //bstrcpy(r,s);
        int l=s.size();
        if(n<11)cout<<"NO"<<endl;
        else{
            i=0;
            while(l>11){
                if(s[i]!='8')s.erase(s.begin()+i);
                i++;
                l--;
            }
            //cout<<s.size();
            if(s[0]=='8')cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
    }
    return 0;
}


#include <iostream>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define v vector<int>
using namespace std;

int main() {
	ll t;
	cin>>t;
	while(t--){
	    int n,k=0;
	    cin>>n;
	    cin.ignore();
	    string s;
	    cin>>s;
	    f(i,n){
	        if(s[i]=='8'){
	            k=i+1;
	            break;
	        }
	    }
	    if(n-k>=11&&k!=0){
	        cout<<"YES"<<endl;
	    }
	    else
	    cout<<"NO"<<endl;
	}
	return 0;
}


#include <iostream>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define v vector<int>
using namespace std;

int main() {
	ll t;
	cin>>t;
	while(t--){
	    int n,k=-1;
	    cin>>n;
	    cin.ignore();
	    string s;
	    cin>>s;
	    f(i,n){
	        if(s[i]=='8'){
	            k=i;
	            break;
	        }
	    }
	    if(n-k>=11&&k!=-1){
	        cout<<"YES"<<endl;
	    }
	    else
	    cout<<"NO"<<endl;
	}
	return 0;
}


#include <iostream>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define v vector<int>
using namespace std;

int main() {
	ll t;
	cin>>t;
	while(t--){
	    int n,k=-1;
	    cin>>n;
	    cin.ignore();
	    string s;
	    cin>>s;
	    f(i,n){
	        if(s[i]=='8'){
	            k=i;
	            break;
	        }
	    }
	    if(n-k>=10&&k!=-1){
	        cout<<"YES"<<endl;
	    }
	    else
	    cout<<"NO"<<endl;
	}
	return 0;
}


#include <iostream>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define v vector<int>
using namespace std;

int main() {
	ll t;
	cin>>t;
	while(t--){
	    int n,k;
	    cin>>n;
	    cin.ignore();
	    string s;
	    cin>>s;
	    f(i,n){
	        if(s[i]=='8'){
	            k=i;
	            break;
	        }
	    }
	    if(n-k>=11){
	        cout<<"YES"<<endl;
	    }
	    else
	    cout<<"NO"<<endl;
	}
	return 0;
}


#include <iostream>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define v vector<int>
using namespace std;

int main() {
	ll t;
	cin>>t;
	while(t--){
	    int n,k=0;
	    cin>>n;
	    cin.ignore();
	    string s;
	    cin>>s;
	    f(i,n){
	        if(s[i]=='8'){
	            k=i;
	            break;
	        }
	    }
	    if(n-k>=10&&k!=0){
	        cout<<"YES"<<endl;
	    }
	    else
	    cout<<"NO"<<endl;
	}
	return 0;
}


#include <iostream>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define v vector<int>
using namespace std;

int main() {
	ll t;
	cin>>t;
	while(t--){
	    int n,k=0;
	    cin>>n;
	    cin.ignore();
	    string s;
	    cin>>s;
	    f(i,n){
	        if(s[i]=='8'){
	            k=i;
	            break;
	        }
	    }
	    if(n-k>=11&&k!=0){
	        cout<<"YES"<<endl;
	    }
	    else
	    cout<<"NO"<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main(){

	int t, n;
	string s;

	cin>>t;

	while(t > 0){

		t--;
		int i = 0;
		cin>>n;
		cin>>s;
		if(n < 11 || (n == 11 && s[0] != '8')){
			cout<<"NO\n";
			break;
		}
		for(i = 0; i < n; i++){
			if(s[i] == '8'){
				break;
			}
		}

		if(n - i >= 11)
			cout<<"YES\n";

		else
			cout<<"NO\n";

	}

	return 0;

}


#include<bits/stdc++.h>

using namespace std;

int main(){

	int t, n;
	string s;

	cin>>t;

	while(t > 0){

		t--;
		int i = 0;
		cin>>n;
		cin>>s;
		if(n < 11 || (n == 11 && s[0] != '8')){
			cout<<"NO\n";
			break;
		}
		for(i = 0; i < n; i++){
			if(s[i] != '8'){
				continue;
			}
			break;
		}

		if(n - i >= 11){
			cout<<"YES\n";
		}

	}

	return 0;

}


#include<bits/stdc++.h>

using namespace std;

int main(){

	int t, n;
	string s;

	cin>>t;

	while(t > 0){

		t--;
		int i = 0;
		cin>>n;
		cin>>s;
		if(n < 11 || (n == 11 && s[0] != '8')){
			cout<<"NO\n";
			continue;
		}
		for(i = 0; i < n; i++){
			if(s[i] == '8'){
				break;
			}
		}

		if(n - i >= 11)
			cout<<"YES\n";

		else
			cout<<"NO\n";

	}

	return 0;

}


#include<bits/stdc++.h>

using namespace std;

int main(){

    string n;

    cin>>n;

    int i;

    int index = 1;
    int l = n.length();

    for(i = 1; i < l; i++)
        index = index + pow(2, i);

    for(i = 0; i < l; i++){

        if(n[i] == '7')
            index += pow(2, l) / pow(2, (i + 1));

    }

    cout<<index;

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main(){

	int t, n;
	string s;

	cin>>t;

	while(t > 0){

		t--;
		int i = 0;
		cin>>n;
		cin>>s;
		if(n < 11 || (n == 11 && s[0] != 8)){
			cout<<"NO\n";
			break;
		}
		for(i = 0; i < n - 11; i++){
			if(s[i] != '8'){
				continue;
			}
			break;
		}

		if(n - i >= 11){
			cout<<"YES\n";
		}

	}

	return 0;

}


#include<bits/stdc++.h>

using namespace std;

int main(){

	int t, n;
	string s;

	cin>>t;

	while(t > 0){

		t--;
		int i = 0;
		cin>>n;
		cin>>s;
		if(n < 11 || (n == 11 && s[0] != '8')){
			cout<<"NO\n";
			break;
		}
		for(i = 0; i < n - 11; i++){
			if(s[i] != '8'){
				continue;
			}
			break;
		}

		if(n - i >= 11){
			cout<<"YES\n";
		}

	}

	return 0;

}


#include<bits/stdc++.h>
#define lli long long int

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    int t;
    while(t--){
        int n, i;
        string str;
        getline(cin,str);
        if(n<11)
            cout<<"NO\n";
        else
        {
            for(int i=0;i<n; i++){
            if(str[i]=='8'&&(n-i)==11){
                cout<<"YES\n";
                break;
            }
            cout<<"NO\n";
        }
        }

    }
    return 0;
}


#include<bits/stdc++.h>
#define lli long long int

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    int t;
    while(t--){
        int n, i;
        string str;
        cin.get(str,n);
        if(n<11)
            cout<<"NO\n";
        else
        {
            for(int i=0;i<n; i++){
            if(str[i]=='8'&&(n-i)==11){
                cout<<"YES\n";
                break;
            }
            cout<<"NO\n";
        }
        }

    }
    return 0;
}


#include<bits/stdc++.h>
#define lli long long int

using namespace std;

int main(){
    int t;
    cin>>t;
    while(t--){
        int n, i;
        cin>>n;
        string str;
        cin>>str;

        cout<<str<<endl;

        if(n<11)
            cout<<"NO\n";
        else
        {
            for(int i=0;i<=n-11; i++){
            if(str[i]=='8'){
                cout<<"YES\n";
                break;
            }
            if(i>=n-11) cout<<"NO\n";
        }
        }

    }
    return 0;
}


#include<bits/stdc++.h>
#define lli long long int

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    int t;
    while(t--){
        int n,i;
        string s;
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        if(n>=11){
        for(i=0;i<n;i++){
            if(s[i]=='8'&&(n-i)==11)
            {cout<<"YES\n";
            break;
            }
        }

        }
        else cout<<"NO\n";
    }
    return 0;
}


#include<bits/stdc++.h>
#define lli long long int

using namespace std;

int main(){
    int t;
    cin>>t;
    while(t--){
        int n, i;
        cin>>n;
        string str;
        cin>>str;

        if(n<11)
            cout<<"NO\n";
        else
        {
            for(int i=0;i<=n-11; i++){
            if(str[i]=='8'){
                cout<<"YES\n";
                break;
            }
            if(i>=n-11) cout<<"NO\n";
        }
        }

    }
    return 0;
}


#include<bits/stdc++.h>
#define lli long long int

using namespace std;

int main(){

    ios_base::sync_with_stdio(0);

    int t;
    while(t--){
        int n,i;
        string s;
        cin>>n;
        for(i=0;i<n;i++){
            cin>>s[i];
        }
        if(n>=11){
        for(i=0;i<n;i++){
            if(s[i]=='8'&&(n-i)==11)
            cout<<"YES\n";
        }
        }
        else cout<<"NO\n";
    }

    return 0;

}


#include<bits/stdc++.h>
#define lli long long int

using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    int t;
    while(t--){
        int n, i;
        string str;
        getline(cin,str);
        if(n<11)
            cout<<"NO\n";
        else
        {
            for(int i=0;i<n; i++){
            if(str[i]=='8'&&(n-i-1)==11){
                cout<<"YES\n";
                break;
            }
            cout<<"NO\n";
        }
        }

    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    while(n--)
    {
        int x;
        cin >> x;
        string s;
        cin >> s;
        for(int i=0; i<x; i++)
        {
            if(s[i]=='8')
                break;
        }
        if(x-i>=11) cout << "YES\n";
        else cout << "NO\n";
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    while(n--)
    {
        long long int x;
        cin >> x;
        string s;
        cin >> s;
        long long int cnt=0;
        while(s[cnt]!='8')
        {
            cnt++;
        }
        long long int dis = s.length()-cnt;
        if(dis>=11)cout << "YES\n";
        else cout << "NO" << endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    while(n--)
    {
        int x;
        cin >> x;
        string s;
        cin >> s;
        if(x<11)
        {
            cout << "no" << endl;
        }
        else{
            for(int i=0; i<x; i++)
        {
            if(s[i]=='8' && (x-i)>=11)
            {
                cout << "YES\n";
                break;
            }
            else if(s[i]!=8 && (x-i)<11)
            {
                cout << "NO" << endl;
                break;
            }
        }
        }
    }
    return 0;
}


#include<iostream>

using namespace std;

int main()  {
    int n, count = 0, max = 0, dead1 = 0, dead2 = 0;
    cin >> n;
    int a[n];
    for(int i=0;i<n;i++)
        cin >> a[i];
    for(int i=0;i<n;i++)    {
        count = 0;
        int j=1;
        while (dead1==0 || dead2 == 0)  {
            if(a[i-j] < a[i] && i-j>=0)
                count++;
            if(a[i+j] < a[i] && i+j<n)
                count++;
            if(a[i-j] > a[i] && i-j>=0)
                dead1=1;
            if(a[i+j]>a[i] && i+j<n)
                dead2 =1;
            if(i-j<0 && i+j>=n)
                break;
        }
        if(count>max)
            max=count;
    }
    cout << max;

    return 0;
}


#include<iostream>

using namespace std;

int main()  {
    int n, count=0, max=0;
    cin >> n;
    int a[n];
    for(int i=0;i<n;i++)
        cin >> a[i];
    if(n == 1)  {
        cout << 1 << endl;
        return 0;
    }
    for(int i=0;i<n;i++)    {
        int j = i-1, k = i+1, temp = a[i];
        count=0;
        while(j>=0 || k<n)  {
            if(temp >= a[j] && j>=0)    {
                count++;
                j--;
            }
            else
                j=0;
            if(temp >= a[k] && k<n)    {
                count++;
                k++;
            }
        }
        if(count>max)
            max = count;
    }
    cout << max << endl;

    return 0;
}


#include<iostream>

using namespace std;

int main()  {
    int n, count = 0, max = 0, dead1 = 0, dead2 = 0;
    cin >> n;
    int a[n];
    for(int i=0;i<n;i++)
        cin >> a[i];
    if(n==1)    {
        cout << 1;
        return 0;
    }
    for(int i=0;i<n;i++)    {
        count = 0;
        int j=1;
        while (dead1==0 || dead2 == 0)  {
            if(a[i-j] < a[i] && i-j>=0)
                count++;
            if(a[i+j] < a[i] && i+j<n)
                count++;
            if(a[i-j] > a[i] && i-j>=0)
                dead1=1;
            if(a[i+j]>a[i] && i+j<n)
                dead2 =1;
            if(i-j<0 && i+j>=n)
                break;
        }
        if(count>max)
            max=count;
    }
    cout << max;

    return 0;
}


#include<iostream>

using namespace std;

int main()  {
    int n, count=0, max=0;
    cin >> n;
    int a[n];
    for(int i=0;i<n;i++)
        cin >> a[i];
    if(n == 1)  {
        cout << 1 << endl;
        return 0;
    }
    for(int i=0;i<n;i++)    {
        int j = i-1, k = i+1, temp = a[i];
        count=0;
        while(j>=0 || k<n)  {
            if(temp >= a[j] && j>=0)    {
                count++;
                j--;
            }
            else
                j=0;
            if(temp >= a[k] && k<n)    {
                count++;
                k++;
            }
            if(temp < a[k] && temp < a[j])
                break;
        }
        if(count>max)
            max = count;
    }
    cout << max << endl;

    return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include <utility>
#include<map>
#include<set>
#include<iterator>
#include<stack>
#include<bitset>
#include<queue>
#include<deque>
#define all(v) ((v).begin()) , ((v).end())
#define sz(v) ((int)((v).size()))
using namespace std;
set<int> st;
set<int> ::iterator it;
map<int, int> mp;
map<int, int> ::iterator itr;
int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL), cout.tie(NULL);
	int a, arr[10000], s = 1, c = 0, Xx = 0;
	cin >> a;
	for (int i = 0; i < a; i++)
		cin >> arr[i];
	for (int i = 0; i < a; i++) {
		for (int k = i + 1; k < a; k++) {
			if (arr[k] < arr[i])
				s++;
			else break;
		}
		for (int l = i - 1; l > 0; l--) {
			if (arr[l] < arr[i] && arr[l] <= arr[l + 1])
				c++;
			else break;
		}

		if ((s + c) > Xx)
			Xx = s + c;
		s = 1, c = 0;

	}
	cout << Xx << endl;
	return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include <utility>
#include<map>
#include<set>
#include<iterator>
#include<stack>
#include<bitset>
#include<queue>
#include<deque>
#define all(v) ((v).begin()) , ((v).end())
#define sz(v) ((int)((v).size()))
using namespace std;
set<int> st;
set<int> ::iterator it;
map<int, int> mp;
map<int, int> ::iterator itr;
int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL), cout.tie(NULL);
	int a, arr[10000], s = 1, c = 0, Xx = 0;
	cin >> a;
	for (int i = 0; i < a; i++)
		cin >> arr[i];
	for (int i = 0; i < a; i++) {
		for (int k = i + 1; k < a; k++) {
			if (arr[k] < arr[i])
				s++;
			if (arr[k] == arr[k - 1])
				s++;
			else break;
		}
		for (int l = i - 1; l >= 0; l--) {
			if (arr[l] < arr[i] && arr[l] <= arr[l + 1])
				c++;
			else break;
		}

		if ((s + c) > Xx)
			Xx = s + c;
		s = 1, c = 0;

	}
	cout << Xx << endl;
	return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include <utility>
#include<map>
#include<set>
#include<iterator>
#include<stack>
#include<bitset>
#include<queue>
#include<deque>
#define all(v) ((v).begin()) , ((v).end())
#define sz(v) ((int)((v).size()))
using namespace std;
set<int> st;
set<int> ::iterator it;
map<int, int> mp;
map<int, int> ::iterator itr;
int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL), cout.tie(NULL);
	int a, arr[10000], s = 1, c = 0, Xx = 0;
	cin >> a;
	for (int i = 0; i < a; i++)
		cin >> arr[i];
	for (int i = 0; i < a; i++) {
		for (int k = i+1; k < a; k++) {
			if (arr[k] < arr[i])
				s++;
			else break;
		}
		for (int l = i-1; l >= 0; l--) {
			if (arr[l] < arr[i] && arr[l]<=arr[l+1])
				c++;
			else break;
		}

		if ((s + c) > Xx)
			Xx = s + c;
		s = 1, c = 0;

	}
	cout << Xx << endl;
	return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include <utility>
#include<map>
#include<set>
#include<iterator>
#include<stack>
#include<bitset>
#include<queue>
#include<deque>
#define all(v) ((v).begin()) , ((v).end())
#define sz(v) ((int)((v).size()))
using namespace std;
set<int> st;
set<int> ::iterator it;
map<int, int> mp;
map<int, int> ::iterator itr;
int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL), cout.tie(NULL);
	int a, arr[10000], s = 1, Xx = 0;
	cin >> a;
	for (int i = 0; i < a; i++)
		cin >> arr[i];
	for (int i = 0; i < a; i++) {
		s = 1;
		for (int k = i; k < a - 1; k++) {
			if (arr[k + 1] <= arr[k])
				s++;
			else break;
		}
		for (int l = i - 1; l > 0; l--) {
			if (arr[l] <= arr[l + 1])
				s++;
			else break;
		}

		if (s > Xx)
			Xx = s;

	}
	cout << Xx << endl;
	return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include <utility>
#include<map>
#include<set>
#include<iterator>
#include<stack>
#include<bitset>
#include<queue>
#include<deque>
#define all(v) ((v).begin()) , ((v).end())
#define sz(v) ((int)((v).size()))
using namespace std;
set<int> st;
set<int> ::iterator it;
map<int, int> mp;
map<int, int> ::iterator itr;
int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL), cout.tie(NULL);
	int a, arr[10000], s = 1, c = 0, Xx = 0;
	cin >> a;
	for (int i = 0; i < a; i++)
		cin >> arr[i];
	for (int i = 0; i < a; i++) {
		for (int k = i+1; k < a; k++) {
			if (arr[k] < arr[i])
				s++;
			else if(arr[k]==arr[i]  && arr[k-1]==arr[k])
			s++;
			else break;
		}
		for (int l = i-1; l >= 0; l--) {
			if (arr[l] < arr[i] && arr[l]<=arr[l+1])
				c++;
			else break;
		}

		if ((s + c) > Xx)
			Xx = s + c;
		s = 1, c = 0;

	}
	cout << Xx << endl;
	return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include <utility>
#include<map>
#include<set>
#include<iterator>
#include<stack>
#include<bitset>
#include<queue>
#include<deque>
#define all(v) ((v).begin()) , ((v).end())
#define sz(v) ((int)((v).size()))
using namespace std;
set<int> st;
set<int> ::iterator it;
map<int, int> mp;
map<int, int> ::iterator itr;
int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL), cout.tie(NULL);
	int a, arr[10000], s = 1, Xx = 0;
	cin >> a;
	for (int i = 0; i < a; i++)
		cin >> arr[i];
	for (int i = 0; i < a; i++) {
	    	s = 1;
		for (int k = i; k < a-1 ; k++) {
			if (arr[k+1] <= arr[k])
				s++;
			else break;
		}
		for (int l = i ; l >  0; l--) {
			if (arr[l-1] <= arr[l])
				s++;
			else break;
		}

		if (s > Xx)
			Xx = s ;

	}
	cout << Xx << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define lim 1000000
#define mod 1000003ll
#define pii pair<ll,ll>
#define ull usigned long long

const float pi = 3.141592653589793238;

ll toint(const string &s) {stringstream ss; ss << s; ll x; ss >> x; return x;}
string tostring ( ll number ){stringstream ss; ss<< number; return ss.str();}

int main(){

	ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

    ll n;
    cin>>n;

    ll arr[n];
    ll maxm = INT_MIN,max_idx;

    for(ll i = 0; i < n; i++){
    	cin>>arr[i];
    }

    vector<ll> indexes;

    for(ll i = 1 ; i < n-1; i++){
    	if(arr[i-1]<=arr[i] && arr[i]>=arr[i+1]) indexes.pb(i);
    }

    if(n==1){
    	cout<<1;
    	return 0;
    }
    for(auto x : indexes){
    ll cnt = 1,flag = 1,check=1;
    max_idx = x;
    for(ll j = max_idx+1,k=max_idx-1; j < n || k >= 0; j++,k--){
    	if(arr[j-1]>=arr[j] && flag) cnt++;
    	else flag = 0;
    	if(arr[k+1] >= arr[k] && check) cnt++;
    	else check = 0;
    	if(!flag && !check) break;
    }
    maxm = max(cnt,maxm);
   }
   cout<<maxm;

   return 0;

}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define lim 1000000
#define mod 1000003ll
#define pii pair<ll,ll>
#define ull usigned long long

const float pi = 3.141592653589793238;

ll toint(const string &s) {stringstream ss; ss << s; ll x; ss >> x; return x;}
string tostring ( ll number ){stringstream ss; ss<< number; return ss.str();}

int main(){

	ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

    ll n;
    cin>>n;

    ll arr[n];
    ll maxm = INT_MIN,max_idx;

    for(ll i = 0; i < n; i++){
    	cin>>arr[i];
    	if(arr[i]>maxm){
    		maxm = arr[i];
    		max_idx = i;
    	}

    }
    if(n==1){
    	cout<<1;
    	return 0;
    }
    ll cnt = 1,flag = 1,check=1;
    //cout<<max_idx<<"\n";
    for(ll j = max_idx+1,k=max_idx-1; j < n || k >= 0; j++,k--){
    	if(arr[j-1]>=arr[j] && flag) cnt++;
    	else flag = 0;
    	if(arr[k] >= arr[k-1] && check) cnt++;
    	else check = 0;
    	if(!flag && !check) break;
    }
    cout<<cnt+1;

   return 0;

}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define lim 1000000
#define mod 1000003ll
#define pii pair<ll,ll>
#define ull usigned long long

const float pi = 3.141592653589793238;

ll toint(const string &s) {stringstream ss; ss << s; ll x; ss >> x; return x;}
string tostring ( ll number ){stringstream ss; ss<< number; return ss.str();}

int main(){

	ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

    ll n;
    cin>>n;

    ll arr[n];
    ll maxm = INT_MIN,max_idx;

    for(ll i = 0; i < n; i++){
    	cin>>arr[i];
    	if(arr[i]>maxm){
    		maxm = arr[i];
    		max_idx = i;
    	}

    }
    if(n==1){
    	cout<<1;
    	return 0;
    }
    ll cnt = 1,flag = 1,check=1;
    //cout<<max_idx<<"\n";
    for(ll j = max_idx+1,k=max_idx-1; j < n || k >= 0; j++,k--){
    	if(arr[j-1]>=arr[j] && flag) cnt++;
    	else flag = 0;
    	if(arr[k+1] >= arr[k] && check) cnt++;
    	else check = 0;
    	if(!flag && !check) break;
    }
    cout<<cnt;

   return 0;

}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define lim 1000000
#define mod 1000003ll
#define pii pair<ll,ll>
#define ull usigned long long

const float pi = 3.141592653589793238;

ll toint(const string &s) {stringstream ss; ss << s; ll x; ss >> x; return x;}
string tostring ( ll number ){stringstream ss; ss<< number; return ss.str();}

int main(){

	ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

    ll n;
    cin>>n;

    ll arr[n];
    ll maxm = INT_MIN,max_idx;

    for(ll i = 0; i < n; i++){
    	cin>>arr[i];
    }
    if(n==1){
    	cout<<1;
    	return 0;
    }
    if(is_sorted(arr,arr+n,greater<int>())){
    	cout<<n;
    	return 0;
    }
    else if(is_sorted(arr,arr+n)){
    	cout<<n;
    	return 0;
    }

    vector<ll> indexes;

    for(ll i = 1 ; i < n-1; i++){
    	if(arr[i-1]<=arr[i] && arr[i]>=arr[i+1]) indexes.pb(i);
    }

    for(auto x : indexes){
    ll cnt = 1,flag = 1,check=1;
    max_idx = x;
    for(ll j = max_idx+1,k=max_idx-1; j < n || k >= 0; j++,k--){
    	if(arr[j-1]>=arr[j] && flag) cnt++;
    	else flag = 0;
    	if(arr[k+1] >= arr[k] && check) cnt++;
    	else check = 0;
    	if(!flag && !check) break;
    }
    maxm = max(cnt,maxm);
   }
   cout<<maxm;

   return 0;

}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define lim 1000000
#define mod 1000003ll
#define pii pair<ll,ll>
#define ull usigned long long

const float pi = 3.141592653589793238;

ll toint(const string &s) {stringstream ss; ss << s; ll x; ss >> x; return x;}
string tostring ( ll number ){stringstream ss; ss<< number; return ss.str();}

int main(){

	ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

    ll n;
    cin>>n;

    ll arr[n];
    ll maxm = INT_MIN,max_idx;

    for(ll i = 0; i < n; i++){
    	cin>>arr[i];
    }
    if(n==1){
    	cout<<1;
    	return 0;
    }
    if(is_sorted(arr,arr+n,greater<int>())){
    	cout<<n;
    	return 0;
    }
    else if(is_sorted(arr,arr+n)){
    	cout<<n;
    	return 0;
    }

    vector<ll> indexes;

    for(ll i = 0 ; i < n; i++){
    	if(arr[i-1]<=arr[i] && arr[i]>=arr[i+1]) indexes.pb(i);
    }

    for(auto x : indexes){
    ll cnt = 1,flag = 1,check=1;
    max_idx = x;
    for(ll j = max_idx+1,k=max_idx-1; j < n || k >= 0; j++,k--){
    	if(arr[j-1]>=arr[j] && flag) cnt++;
    	else flag = 0;
    	if(arr[k+1] >= arr[k] && check) cnt++;
    	else check = 0;
    	if(!flag && !check) break;
    }
    maxm = max(cnt,maxm);
   }
   cout<<maxm;

   return 0;

}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define lim 1000000
#define mod 1000003ll
#define pii pair<ll,ll>
#define ull usigned long long

const float pi = 3.141592653589793238;

ll toint(const string &s) {stringstream ss; ss << s; ll x; ss >> x; return x;}
string tostring ( ll number ){stringstream ss; ss<< number; return ss.str();}

int main(){

	ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

    ll n;
    cin>>n;

    ll arr[n];
    ll maxm = INT_MIN,max_idx;

    for(ll i = 0; i < n; i++){
    	cin>>arr[i];
    }
    if(n==1){
    	cout<<1;
    	return 0;
    }
    if(is_sorted(arr,arr+n,greater<int>())){
    	cout<<n;
    	return 0;
    }
    else if(is_sorted(arr,arr+n)){
    	cout<<n;
    	return 0;
   }
   ll j,cnt;
   for(ll i = 0; i < n; i++){
   		j = i-1;
   		cnt = 0;
   		while(j>=0 && arr[j]<=arr[j+1]){
   			cnt++;
   			j--;
   		}
   		j=i+1;
   		while(j<n && arr[j]<=arr[j-1]){
   			cnt++;
   			j++;
   		}
   		cnt+=1;
   		maxm = max(cnt,maxm);
   }
   cout<<maxm;

   return 0;

}


#include <iostream>
#include<algorithm>
#include<vector>
#define pb push_back
using namespace std;
vector<int>v;

int main() {
	int n,a[1001];
	cin>>n;
	for(int i=0;i<n;i++)
	cin>>a[i];
	int max;

	for(int i=0;i<n;i++){
		max=a[i];
		int cnt1=1;
		int cnt2=0;
		for(int j=i+1;j<n;j++){
			if(a[j]<=max){
				++cnt1;
				max=a[j];
			}else{
				break;
			}
		}
		for(int j=i-1;j>=0;j--){
			if(a[j]<=max){
				++cnt2;
				max=a[j];
			}else{
				break;
			}
		}
		v.pb(cnt1+cnt2);
	}

	sort(v.begin(),v.end(),greater<int>());
	cout<<v[0];

	return 0;
}


#include <iostream>
#include<algorithm>
#include<vector>
#define pb push_back
using namespace std;
vector<int>v;

int main() {
	int n,a[1001];
	cin>>n;
	for(int i=0;i<n;i++)
	cin>>a[i];
	int max;
	int cnt=0;
	for(int i=0;i<n;i++){
		max=a[i];
		cnt=1;
		for(int j=i+1;j<n;j++){
			if(a[j]<=max){
				cnt++;
				max=a[j];
			}else{
				break;
			}
		}
		for(int j=i-1;j>=0;j--){
			if(a[j]<=max){
				cnt++;
				max=a[j];
			}else{
				break;
			}
		}
		v.pb(cnt);
	}

	sort(v.begin(),v.end(),greater<int>());
	cout<<v[0];

	return 0;
}


#include <iostream>
using namespace std;
int arr[1005];
int solve(int n,int index){
	int right=0;
	int left=0;
	int rigthreference=arr[index];
	int leftreference=arr[index];
	for(int i=index;i<n;i++){
		if(arr[i]>rigthreference){
			break;
		}
		else{
			++right;
			if(arr[i]<rigthreference){
				rigthreference=arr[i];

			}

		}
	}
	for(int i=index-1;i>=0;i--){
		if(arr[i]>leftreference){
			break;
		}
		else{
			++left;
			if(arr[i]<leftreference){
				leftreference=arr[i];

			}

		}
	}
	return right+left;
}
int main() {
int n;
cin>>n;
for(int i=0;i<n;i++){
	cin>>arr[i];
}
int resultvalue=0;
int resultindex=0;
for(int i=0;i<n;i++){
	int value=solve(n,i);
	if(value>resultvalue){
		resultindex=i;
		resultvalue=value;
	}

}
cout<<resultvalue<<endl;

	return 0;
}


#include <iostream>
#include<algorithm>
#include<vector>
#define pb push_back
using namespace std;

int main() {
	int n,a[1005];
	cin>>n;
	for(int i=0;i<n;i++)
	cin>>a[i];
	int max;
    vector<int>v;
	for(int i=0;i<n;i++){
		max=a[i];
		int cnt1=1;
		int cnt2=0;
		for(int j=i+1;j<n;j++){
			if(a[j]<=max){
				++cnt1;
				max=a[j];
			}else{
				break;
			}
		}
		for(int j=i-1;j>=0;j--){
			if(a[j]<=max){
				++cnt2;
				max=a[j];
			}else{
				break;
			}
		}
		v.pb(cnt1+cnt2);
	}

	sort(v.begin(),v.end(),greater<int>());
	cout<<v[0];

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=1,d,x[1000],m[1000],z=0,y=0,t=0,s=0,i,o=1;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++)
	    cin>>a[i];
	for (int i=0;i<n;i++){
	    for(int j=i;j<n-1;j++){
	       if ( a[j+1] <=a[j])
	       c++;
	       else
	       break; }
	         for(int j=i;j>0;j--){
	       if ( a[j-1] <= a[j])
	       c++;
	       else
	     break;}
	  z=max(z,c);
	    c=1;   }
	    cout<<max(z,o);}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=0,d,x[1000],m[1000],z=0,y=0,t=0,s=0,i,o;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++){
	    cin>>a[i];	}
	for (int i=0;i<n;i++){
	    for(int j=i;j<n-1;j++){
	       if ( a[j+1] <=a[j])
	       c++;
	       else
	       break; }
	         for(int j=i;j>0;j--){
	       if ( a[j-1] <= a[j])
	       c++;
	       else
	     break;}
	  z=max(z,c);
	    c=1;   }
	    cout<<z;}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=0,d,x[1000],m[1000],z=0,y=0,t=0,s=0,i,o;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++){
	    cin>>a[i];	}
	for (int i=0;i<n;i++){
	    for(int j=i;j<n;j++){
	       if (j-1>=0 && a[j+1] >= a[j]  && t1==true)
	       c++;
	       else
	       t1=false;}
	         for(int j=i;j>=0;j--){
	       if (j+1<n && a[j-1] >= a[j]  && t2==true )
	       c++;
	       else
	       t1=false;}
	  z=max(z,c);
	    t1==true;
	    t2=true;
	    c=0;
	    s=0;}
	    cout<<z+1;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=1,d,x[1000],m[1000],z=0,y=0,t=0,s=0,i,o=1,q;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++)
	    cin>>a[i];
	for (int i=0;i<n;i++){
	    for(int j=i;j<n-1;j++){
	       if ( a[j+1] <=a[j])
	       c++;
	       else
	       break; }
	         for(int j=i;j>0;j--){
	       if ( a[j-1] <= a[j])
	       c++;
	       else
	     break;}
	  z=max(z,c);
	    c=1;   }
	    cout<<max(z,o);}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=0,d,x,m,z=0,y=0,t=0,s=0,i,o;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++){
	    cin>>a[i];	}
	copy(a, a+n, b);
	reverse(b,b+n);
	for (int i=0;i<n;i++){
	    for(int j=i;j<n;j++){
	        if (a[j+1] >= a[j]  && t1==true && j<n-1)
	       c++;
	       else
	       t1=false;
          if (b[n-1-j+1] <= b[n-1-j] && t2==true && j>0)
	        t++;
	        else
	        t2=false;
	     }
	     s=max(s,t);
	    z=max(z,c);
	    t=0;
	    t1=true;
	    t2=true;
	    c=0;}
	   cout<<s+z+1;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=0,d,x,m,z=0,y=0,t=0,s,i,o;
	cin>>n;
	for (int i=0;i<n;i++){
	    cin>>a[i];	}
	copy(a, a+n, b);
	reverse(b,b+n);
	for (int i=0;i<n;i++){
	    for(int j=i;j<n-1;j++){
	        if (a[j+1] >= a[j])
	       c++;
	       else if (b[n-j+1] >= b[n-j])
	       c++;    }
	    z=max(z,c);
	    c=0;}
	    if (n==1)
	    cout<<1;
	    else
	    cout<<z;}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=0,d,x[1000],m[1000],z=0,y=0,t=0,s=0,i,o;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++){
	    cin>>a[i];	}
	for (int i=0;i<n;i++){
	    for(int j=i;j<n;j++){
	       if ( a[j+1] <=a[j])
	       c++;
	       else
	       break; }
	         for(int j=i;j>0;j--){
	       if ( a[j-1] <= a[j])
	       c++;
	       else
	     break;}
	  z=max(z,c);
	    c=0;
	   }
	    cout<<z;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=0,d,x[1000],m[1000],z=0,y=0,t=0,s=0,i,o=1;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++){
	    cin>>a[i];	}
	for (int i=0;i<n;i++){
	    for(int j=i;j<n-1;j++){
	       if ( a[j+1] <=a[j])
	       c++;
	       else
	       break; }
	         for(int j=i;j>0;j--){
	       if ( a[j-1] <= a[j])
	       c++;
	       else
	     break;}
	  z=max(z,c);
	    c=1;   }
	    cout<<max(z,o);}


#include <bits/stdc++.h>
using namespace std;
int main() {
	long long n,k,a[1000],b[1000],c=0,d,x[1000],m[1000],z=0,y=0,t=0,s=0,i,o=1;
	bool t1=true,t2=true;
	cin>>n;
	for (int i=0;i<n;i++)
	    cin>>a[i];
	for (int i=0;i<n;i++){
	    for(int j=i;j<n-1;j++){
	       if ( a[j+1] <=a[j])
	       c++;
	       else
	       break; }
	         for(int j=i;j>=0;j--){
	       if ( a[j-1] <= a[j])
	       c++;
	       else
	     break;}
	  z=max(z,c);
	    c=1;   }
	    cout<<max(z,o);}


#include<bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  std::cin >> n;
  int ar[n+1];
  for (size_t i = 1; i <= n; i++) {
    std::cin >> ar[i];
  }
  ar[0]=0;
  ar[n+1]=0;
  int j,k,a,b,c;
  int lmax=0;
  for (size_t i = 1; i <= n; i++) {
  //  a=0,b=0;
    j=i;
    k=i;
  /*  while (( a==0 )||( b==0 )) {
        if (j<0) {
        j=0;
        a=1;
      }
    else if (ar[j]<=ar[i]) {
        j--;
      }
      else{
        a=1;
      }
      if (k==n) {
        k=n-1;
        b=1;
      }
      else if (ar[k]<=ar[i]) {
      k++;
      }
      else
      { b=1;}
    }*/
    while ((j>0)&&(ar[j-1]<=ar[j])) {
      j--;
    }
    while ((k<=n)&&(ar[k+1]<= ar[k])) {
      k++;
    }
    c= k-j;
    if (c>lmax) {
      lmax=c;
    }
  }
  std::cout << lmax << '\n';
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  std::cin >> n;
  int ar[n+1];
  for (size_t i = 1; i <= n; i++) {
    std::cin >> ar[i];
  }
  ar[0]=0,ar[n+1]=0;;
  int j,k,a,b,c;
  int lmax=0;
  for (size_t i = 1; i <= n; i++) {
  //  a=0,b=0;
    j=i;
    k=i;
  /*  while (( a==0 )||( b==0 )) {
        if (j<0) {
        j=0;
        a=1;
      }
    else if (ar[j]<=ar[i]) {
        j--;
      }
      else{
        a=1;
      }
      if (k==n) {
        k=n-1;
        b=1;
      }
      else if (ar[k]<=ar[i]) {
      k++;
      }
      else
      { b=1;}
    }*/
    while ((j>0)&&(ar[j-1]<=ar[j])) {
      j--;
    }
    while ((k<=n)&&(ar[k+1]<= ar[k])) {
      k++;
    }
    c= k-j;
    if (c>lmax) {
      lmax=c;
    }
  }
  std::cout << lmax << '\n';
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  std::cin >> n;
  int ar[n+1];
  for (size_t i = 1; i <= n; i++) {
    std::cin >> ar[i];
  }
  ar[0]=0,ar[n+1]=0;
  int j,k,a,b,c;
  int lmax=0;
  for (size_t i = 1; i <= n; i++) {
  //  a=0,b=0;
    j=i;
    k=i;
  /*  while (( a==0 )||( b==0 )) {
        if (j<0) {
        j=0;
        a=1;
      }
    else if (ar[j]<=ar[i]) {
        j--;
      }
      else{
        a=1;
      }
      if (k==n) {
        k=n-1;
        b=1;
      }
      else if (ar[k]<=ar[i]) {
      k++;
      }
      else
      { b=1;}
    }*/
    while ((j>0)&&(ar[j-1]<=ar[j])) {
      j--;
    }
    while ((k<=n)&&(ar[k+1]<= ar[k])) {
      k++;
    }
    c= k-j;
    if (c>lmax) {
      lmax=c;
    }
  }
  std::cout << lmax << '\n';
  return 0;
}


#include <bits/stdc++.h>
#include <cstring>
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define pb push_back()
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001;
#define all(c) c.begin(),c.end()
#define mp(x,y) make_pair(x,y)
#define mem(a,val) memset(a,val,sizeof(a))
#define fi first
#define se second
  #define fr(i,a,n) for(long long int i=a;i<n;i++)

using namespace std;
int main()
{
	std::ios::sync_with_stdio(false);

      ll n;
      std::cin >> n;
      ll a[n];
      fr(i,0,n) std::cin >> a[i];
      ll len=0,k,i,j;
      if(n==1) std::cout << "1" << '\n';
      else{fr(i,0,n){
        j=i-1;
        k=i+1;
        while(a[j]<=a[j+1]&&j>=0){
          j--;
        }
        while(a[k]<=a[k-1]&&k<n) k++;
      //  std::cout <<j<< "--------- "<<k << '\n';
        len=max(len,(k-j-1));
      }
      std::cout << len << '\n';
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int count(int a[],int n)
{
    int dp[n],bp[n];
    int i,j,x;
    for(i=0;i<n;i++)
    {
        dp[i]=1;
        bp[i]=1;
    }
    for(i=1;i<n;i++)
    {
        for(j=0;j<i;j++)
        {
            if(a[i]>=a[j]&& dp[i]<dp[j]+1)
            {
                dp[i]=dp[j]+1;
            }
        }
    }
     for(i=n-2;i>=0;i--)
    {
        for(j=n-1;j>i;j--)
        {
            if(a[i]>=a[j]&& bp[i]<bp[j]+1)
            {
                bp[i]=bp[j]+1;
            }
        }
    }
    int maxi=0;
    for(i=0;i<n;i++)
    {
     maxi=max(dp[i]+bp[i]-1,maxi);
    }

    return maxi;
}
int main()
 {
     int n,i;
     cin>>n;
     int a[n];
     for(i=0;i<n;i++)
     cin>>a[i];
     cout<<(count(a,n))-1<<endl;

	//code
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int count(int a[],int n)
{
    int dp[n],bp[n];
    int i,j;
    for(i=0;i<n;i++)
    {
        dp[i]=1;
        bp[i]=1;
    }
    for(i=1;i<n;i++)
    {
        for(j=0;j<i;j++)
        {
            if(a[i]>=a[j]&& dp[i]<dp[j]+1)
            {
                dp[i]=dp[j]+1;
            }
        }
    }
     for(i=n-2;i>=0;i--)
    {
        for(j=n-1;j>i;j--)
        {
            if(a[i]>=a[j]&& bp[i]<bp[j]+1)
            {
                bp[i]=bp[j]+1;
            }
        }
    }
    int maxi=0;
    for(i=0;i<n;i++)
    {
     maxi=max(dp[i]+bp[i]-1,maxi);
    }

    return maxi;
}
int main()
 {
     int n,i;
     cin>>n;
     int a[n];
     for(i=0;i<n;i++)
     cin>>a[i];
     cout<<(count(a,n))-1<<endl;

	//code
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int count(int a[],int n)
{
    int dp[n]={0},bp[n]={0};
    int i,j;
    dp[0]=1;
    bp[n-1]=1;
    for(i=1;i<n;i++)
    {if(a[i]>=a[i-1])
    dp[i]=dp[i-1]+1;
    else
    dp[i]=1;}
    for(i=n-2;i>=0;i--)
    {if(a[i]>=a[i+1])
    bp[i]=bp[i+1]+1;
    else
    bp[i]=1;}
    int maxi=0;
    for(i=0;i<n;i++)
    {
        maxi=max(dp[i]+bp[i]-1,maxi);
    }

    return maxi;
}
int main()
 {

     int n,i;
     cin>>n;
     int a[n];
     for(i=0;i<n;i++)
     cin>>a[i];
     cout<<(count(a,n))<<endl;

	//code
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int count(int a[],int n)
{
    int dp[n],bp[n];
    int i,j;
    for(i=0;i<n;i++)
    {
        dp[i]=1;
        bp[i]=1;
    }
    for(i=1;i<n;i++)
    {
        for(j=0;j<i;j++)
        {
            if(a[i]>a[j]&& dp[i]<dp[j]+1)
            {
                dp[i]=dp[j]+1;
            }
        }
    }
     for(i=n-2;i>=0;i--)
    {
        for(j=n-1;j>i;j--)
        {
            if(a[i]>a[j]&& bp[i]<bp[j]+1)
            {
                bp[i]=bp[j]+1;
            }
        }
    }
    int maxi=0;
    for(i=0;i<n;i++)
    {
     maxi=max(dp[i]+bp[i]-1,maxi);
    }

    return maxi;
}
int main()
 {

     int n,i;
     cin>>n;
     int a[n];
     for(i=0;i<n;i++)
     cin>>a[i];
     cout<<(count(a,n))<<endl;

	//code
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int count(int a[],int n)
{
    int dp[n],bp[n];
    int i,j;
    for(i=0;i<n;i++)
    {
        dp[i]=1;
        bp[i]=1;
    }
    for(i=1;i<n;i++)
    {
        for(j=0;j<i;j++)
        {
            if(a[i]>=a[j]&& dp[i]<dp[j]+1)
            {
                dp[i]=dp[j]+1;
            }
        }
    }
     for(i=n-2;i>=0;i--)
    {
        for(j=n-1;j>i;j--)
        {
            if(a[i]>=a[j]&& bp[i]<bp[j]+1)
            {
                bp[i]=bp[j]+1;
            }
        }
    }
    int maxi=0;
    for(i=0;i<n;i++)
    {
     maxi=max(dp[i]+bp[i]-1,maxi);
    }

    return maxi;
}
int main()
 {
     int n,i;
     cin>>n;
     int a[n];
     for(i=0;i<n;i++)
     cin>>a[i];
     cout<<(count(a,n))<<endl;

	//code
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, k = 0; cin >> n;
    vector <int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    if (n == 1) {cout <<"1"; return(0);}
    int flag = 1, count = 1, mx = 0;

    while (k < n - 1)
    {
        // cout << endl
            //  << "Comparing " << a[k] << "and " << a[k + 1];
        if (flag == 1)
        {
            if(a[k+1] >= a[k])
            {
                count++;
                k++;
            }
            else {
                flag = -1;
                // count++;
            }
            mx = max(count, mx);
        }
        if (flag == -1)
        {
            if (a[k] >= a[k+1]) count++, k++;
            else {
                mx = max(mx, count), count = 1, flag = 1;
                while(a[k] == a[k-1]) k--;
            }
        }
        // cout << " Count - " << count << ". MaxC - " << mx;
    }
    cout << mx;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, k = 0; cin >> n;
    vector <int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    if (n == 1) {cout <<"1"; return(0);}
    int flag = 1, count = 1, mx;

    while (k < n - 1)
    {
        // cout << endl
            //  << "Comparing " << a[k] << "and " << a[k + 1];
        if (flag == 1)
        {
            if(a[k+1] >= a[k])
            {
                count++;
                k++;
            }
            else {
                flag = -1;
                // count++;
            }
            mx = max(count, mx);
        }
        if (flag == -1)
        {
            if (a[k] >= a[k+1]) count++, k++;
            else {
                mx = max(mx, count), count = 1, flag = 1;
                while(a[k] == a[k-1]) k--;
            }
        }
        // cout << " Count - " << count << ". MaxC - " << mx;
    }
    cout << mx;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, k = 0; cin >> n;
    vector <int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    if (n == 1) {cout <<"1"; return(0);}
    int flag = 1, count = 1, mx;

    while (k < n)
    {
        if (flag == 1)
        {
            if(a[k+1] >= a[k])
            {
                count++;
                k++;
            }
            else flag = -1;
            mx = max(count, mx);
        }
        if (flag == -1)
        {
            if (a[k] >= a[k+1]) count++, k++;
            else {
                mx = max(mx, count), count = 1, flag = 1;
                while(a[k] == a[k-1])k--;
            }
        }
    }
    cout << mx;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, k = 0; cin >> n;
    vector <int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    if (n == 1) {cout <<"1"; return(0);}
    int flag = 1, count = 0, mx;

    while (k < n)
    {
        if (flag == 1)
        {
            if(a[k+1] >= a[k])
            {
                count++;
                k++;
            }
            else flag = -1;
            mx = max(count, mx);
        }
        if (flag == -1)
        {
            if (a[k] >= a[k+1]) count++, k++;
            else {
                mx = max(mx, count), count = 1, flag = 1;
                while(a[k] == a[k-1]) k--;
            }
        }
    }
    cout << mx;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, k = 0; cin >> n;
    vector <int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    int flag = 1, count = 1, mx;
    while (k < n)
    {
        if (flag == 1)
        {
            if(a[k+1] >= a[k])
            {
                count++;
                k++;
            }
            else flag = -1;
            mx = max(count, mx);
        }
        if (flag == -1)
        {
            if (a[k] >= a[k+1]) count++, k++;
            else {
                mx = max(mx, count), count = 1, flag = 1;
                while(a[k] == a[k-1])k--;
            }
        }
    }
    cout << mx;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, k = 0; cin >> n;
    vector <int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    if (n == 1) {cout <<"1"; return(0);}
    int flag = 1, count = 1, mx = 0;

    while (k < n - 1)
    {
        // cout << endl
        //      << "Comparing " << a[k] << "and " << a[k + 1];
        if (flag == 1)
        {
            if(a[k+1] >= a[k])
            {
                count++;
                k++;
            }
            else {
                flag = -1;
                // count++;
            }
            mx = max(count, mx);
        }
        if (flag == -1)
        {
            if (a[k] >= a[k+1]) count++, k++, mx = max(mx, count);
            else {
                mx = max(mx, count); count = 1; flag = 1;
                while(a[k] == a[k-1]) k--;
            }
        }
        // cout << " Count - " << count << ". MaxC - " << mx;
    }
    cout << mx;
}


#include<bits/stdc++.h>
using namespace std;

int main() {

	int n;
	cin>>n;
	int a[n];
	int count = 0 ;
	int t = n;
	while(t>0){
		cin>>a[count++];
		t--;
	}
	int maxl = 1;
	for(int i = 0 ; i < n ; i++){
		int count = 1;
		int prev = a[i];
		for(int r = i+1; r < n ; r++){
			if(a[r] <= prev)count++;
			else break;
		}
		prev = a[i];
		for(int r = i-1; r>=0 ; r--){
			if(a[r] <= prev)count++;
			else break;
		}
		if(count > maxl)maxl=count;
	}
	cout<<maxl;
	return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin>>n;
    int A[n];
    for(int i = 0 ; i < n ; i++){
        cin>>A[i];
    }
    int s = 1;
    int ans = 0;
    int maxi = -1;
    int l = 1;
    int r = 0;
    int same = 0;
    for(int i = 0 ; i < n-1 ; i++){
        if(s == 1){
            if(A[i+1] > A[i]){
                l++;
            }
            else if(A[i+1] == A[i]){
                same++;
                l++;
            }
            else{
                s = 2;
                r++;
            }
        }
        else{
            if(A[i + 1] < A[i]){
                r++;
            }
            else if(A[i+1] == A[i]){
                same++;
                r++;
            }
            else{
                if(l + r > ans){
                    ans = l + r;
                    maxi = i - r;
                }
                l = 2 + same;
                r = 0;
                s = 1;
            }
        }
    }
    if(l + r > ans){
        ans = l + r;
        maxi = n - 1 - r;
    }
    cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;

int main() {

	int n;
	cin>>n;
	int a[n];
	int count = 0 ;
	int t = n;
	while(t>0){
		cin>>a[count++];
		t--;
	}
	int maxl = 0;
	for(int i = 0 ; i < n ; i++){
		int count = 0;
		int prev = a[i];
		for(int r = i+1; r < n ; r++){
			if(a[r] <= prev)count++;
			else break;
		}
		prev = a[i];
		for(r = i-1; r>=0 ; r--){
			if(a[r] <= prev)count++;
			else break;
		}
		if(count > maxl)maxl=count;
	}
	cout<<maxl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main() {

	int n;
	cin>>n;
	int a[n];
	int count = 0 ;
	int t = n;
	while(t>0){
		cin>>a[count++];
		t--;
	}
	int maxl = 0;
	for(int i = 0 ; i < n ; i++){
		int count = 0;
		int prev = a[i];
		for(int r = i+1; r < n ; r++){
			if(a[r] <= prev)count++;
			else break;
		}
		prev = a[i];
		for(int r = i-1; r>=0 ; r--){
			if(a[r] <= prev)count++;
			else break;
		}
		if(count > maxl)maxl=count;
	}
	cout<<maxl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main() {

	int n;
	cin>>n;
	int a[n];
	int count = 0 ;
	int t = n;
	while(t>0){
		cin>>a[count++];
		t--;
	}
	int maxl = 1;
	for(int i = 0 ; i < n ; i++){
		int count = 1;
		int prev = a[i];
		for(int r = i+1; r < n ; r++){
			if(a[r] <= prev)count++;
			else break;
			prev = a[r];
		}
		prev = a[i];
		for(int r = i-1; r>=0 ; r--){
			if(a[r] <= prev)count++;
			else break;
			prev = a[r];
		}
		if(count > maxl)maxl=count;
	}
	cout<<maxl;
	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;
const int sz=1002;
int a[sz]={0};
int main()
{
    int n,i,j,c=0,m=0;
    cin>>n;
    for(i=0;i<n;i++)
        cin>>a[i];
    for(i=0;i<n;i++){
            for(j=i;j<n-1;j++){
                if(a[j+1]<=a[j])c++;
                else break;}
         for(j=i;j>0;j--){
                if(a[j-1]<=a[j])c++;
                else break;}
        m=max(m,c);
        c=0;
    }
    cout<<m+1;
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,i,j,c=0,m=0;
    cin>>n;
    int a[80]={0},b[80]={0};
    for(i=1;i<=n;i++)
        cin>>a[i];
    int *p=max_element(a,a+n);
    for(i=1;i<=n;i++){
        if(a[i]==*p)
        {
            for(j=i;j<=n;j++){
                if(a[j-1]>=a[j])c++;
                else break;}
         for(j=i;j>=1;j--){
                if(a[j-1]<=a[j])c++;
                else break;}
        }
        m=max(m,c);
        c=0;
    }
    cout<<m+1;
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;
const int sz=1002;
int a[sz]={0};
int main()
{
    int n,i,j,c=0,m=0;
    cin>>n;

    for(i=0;i<n;i++)
        cin>>a[i];
    int *p=max_element(a,a+n);
    for(i=0;i<n;i++){
        if(a[i]==*p)
        {
            if(i!=n-1)
            for(j=i;j<n-1;j++){
                if(a[j+1]<=a[j])c++;
                else break;}
        if(i!=0)
         for(j=i;j>0;j--){
                if(j==n-1){c++;continue;}
                if(a[j-1]<=a[j])c++;
                else break;}
        }
        m=max(m,c);
        c=0;
    }
    cout<<m+1;
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,i,j,c=0,m=0;
    cin>>n;
    int a[80]={0},b[80]={0};
    for(i=0;i<n;i++)
        cin>>a[i];
    int *p=max_element(a,a+n);
    for(i=0;i<n;i++){
        if(a[i]==*p)
        {
            if(i!=n-1)
            for(j=i;j<n-1;j++){
                if(a[j+1]<=a[j])c++;
                else break;}
        if(i!=0)
         for(j=i;j>0;j--){
                if(j==n-1){c++;continue;}
                if(a[j-1]<=a[j])c++;
                else break;}
        }
        m=max(m,c);
        c=0;
    }
    cout<<m+1;
    return 0;
}


    #define _CRT_SECURE_NO_WARNINGS
    #include<bits/stdc++.h>
    #include <string>
    #include <unordered_map>
    #define endl "\n"
    #define all(v) v.begin(),v.end()
    #define allr(s) s.rbegin(),s.rend()
    #define RT(s) return cout<<s,0
    #define watch(x) cout<<(#x)<<" = "<<x<<endl
    #define sz(s)	(int)(s.size())
    #define PI 3.14159265
    using namespace std;
    typedef long long ll;
    typedef long double ld;
    typedef unsigned long long ull;
    int dy[] = { 1, -1, 0, 0, -1, 1, 1, -1 };
    int dx[] = { 0, 0, 1, -1, 1, -1, 1, -1 };
    void file() {
    #ifndef ONLINE_JUDGE
    	freopen("in.txt", "r", stdin);
    	//freopen("out.txt", "w", stdout);
    #endif
    }
    void fast() {
    	std::ios_base::sync_with_stdio(0);
    	cin.tie(NULL);
    }
    int n;
    vector<int> v1;
    int solve(int idx) {
    	int cnt = 1;
    	for (int i = idx + 1; i < n; i++) {
    		if (v1[i] <= v1[i - 1])
    			cnt++;
    		else
    			break;
    	}
    	for (int i = idx - 1; i >= 0; i--) {
    		if (v1[i] <= v1[i + 1])
    			cnt++;
    		else
    			break;
    	}
    	return cnt;
    }
    int main() {
    	file();
    	fast();
    	cin >> n;
    	v1.resize(n);
    	for (int i = 0; i < n; i++)
    		cin >> v1[i];
    	int mx = INT_MIN;
    	for (int i = 0; i < n; i++) {
    		mx =  max(solve(i), mx);
    	}
    	cout << mx << endl;
    	return 0;
    }


#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	int n;
	cin >> n;
	int a[1001];
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	int Max = -1;
	for (int i = 0; i < n; i++)
	{
		int c = 0;
		int l = i - 1, r = i + 1;
		for (int j = 0; j < n; j++) {
			if ((a[r] <= a[r-1]) && r <= n) {
				c++; r++;
			}
			else
				break;
		}

		for (int j = 0; j < n; j++) {
			if ((a[l] <= a[l+1]) && l >= 0) {
				c++; l--;
			}
			else
				break;
		}
		Max = max(Max, c);
	}
	cout << Max;
	return 0;
}


    #define _CRT_SECURE_NO_WARNINGS
    #include <bits\stdc++.h>
    #include <unordered_map>
    using namespace std;
    typedef long long ll;
    typedef unsigned long long ull;
    typedef long double ld;
    #define Fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    #define endl '\n'
    #define sz(s) (int)(s.size())
    #define all(s) s.begin(),s.end()
    #define exit(s) return cout<<s,0;
    void file() {
    #ifndef ONLINE_JUDGE
    	freopen("in.txt", "r", stdin);//freopen("out.txt", "w", stdout);
    #endif
    }

    int main() {
    	Fast;
    	file();
    	int n, a[1010];
    	cin >> n;
    	for (int i = 0; i < n; i++)
    		cin >> a[i];
    	int mx = 0;
    	for (int i = 0; i < n; i++) {
    		int x = a[i], c = 1;
    		for (int j = i - 1; j >= 0; j--) {
    			if (a[j] <= x)
    				c++, x = a[j];
    			else
    				break;
    		}
    		x = a[i];
    		for (int j = i + 1; j < n; j++) {
    			if (a[j] <= x)
    				c++, x = a[j];
    			else
    				break;
    		}
    		mx = max(c, mx);
    	}
    	cout << mx;
    }


#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <iomanip>
#include <vector>
#include <map>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;

int main()
{
	ios_base::sync_with_stdio(false);
	cout.tie(NULL);
	cin.tie(NULL);

	int n;
	cin >> n;
	vector<int> v(n + 2);
	for (int i = 1; i <= n; i++)
	{
		cin >> v[i];
	}
	int m = -1;
	for (int i = 1; i <= n; i++)
	{
		int c = 0;
		int l = i - 1, r = i + 1;
		while (l >= 1)
		{
			if (v[l] <= v[l + 1])
			{
				c++;
				l--;
			}
			else
			{
				break;
			}
		}
		while (r <= n + 1)
		{
			if (v[r] <= v[r - 1])
			{
				c++;
				r++;
			}
			else
			{
				break;
			}
		}
		m = max(m, c);
	}
	cout << m;
}


#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	int n;
	cin >> n;
	int a[1001];
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	int Max = -1;
	for (int i = 1; i <= n; i++)
	{
		int c = 0;
		int l = i - 1, r = i + 1;
		for (int j = i; j <= n; j++) {
			if ((a[r] <= a[j]) && r <= n) {
				c++; r++;
			}
			else
				break;
		}

		for (int j = i; j <= n; j++) {
			if ((a[l] <= a[j]) && l >= 0) {
				c++; l--;
			}
			else
				break;
		}
		Max = max(Max, c);
	}
	cout << Max;
	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	int n;
	cin >> n;
	int a[1001]{};
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	int Max = -1;
	for (int i = 0; i < n; i++)
	{
		int c = 1;
		int l = i - 1, r = i + 1;
		for (int j = r; j < n; j++) {
			if ((a[j] <= a[j - 1]))
				c++;
			else
				break;
		}

		for (int j = l; j >= 0; j--) {
			if (a[l] <= a[l + 1])
				c++;
			else
				break;
		}
		Max = max(Max, c);
	}
	cout << Max;
	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	int n;
	cin >> n;
	int a[1001]{};
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	int Max = -1;
	for (int i = 0; i < n; i++)
	{
		int c = 1;
		int l = i - 1, r = i + 1;
		for (int j = r; j < n; j++) {
			if ((a[j] <= a[j - 1]))
				c++;
			else
				break;
		}

		for (int j = l; j >= 0; j--) {
			if (a[j] <= a[j + 1])
				c++;
			else
				break;
		}
		Max = max(Max, c);
	}
	cout << Max;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int i,j,k,t,l,n,m=0,a,b,c=0,d,e,f=0,r,s;
	cin>>n;
	int arr[n];
	vector< pair<int,int> > v;
	for(i=0;i<n;i++)
	{
		cin>>k;
		arr[i]=k;
		v.push_back(make_pair(k,i));
	}
	sort(v.begin(),v.end());
	map<int,int> mp;
	for(i=n-1;i>=0;i--)
	{
		if(mp[v[i].first])
		continue;
		mp[v[i].first]=1;
		k=v[i].first;
		l=v[i].second;
		r=v[i].second;
		//cout<<k<<" "<<l<<endl;
		while(l>=0 && arr[l]<=k)
		{
			mp[arr[l]]=1;
			c++;
			k=arr[l];
			l--;
			//cout<<"c="<<c<<endl;
		}
		k=v[i].first;
		while(r<n && arr[r]<=k)
		{
			f=1;
			mp[arr[r]]=1;
			c++;
			k=arr[r];
			r++;
		}
		if(m<c)
		{
			m=c;
		}
		c=0;
	}
	if(f)
	cout<<m-1;
	else
	cout<<m;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int i,j,k,t,l,n,m=0,a,b,c=0,d,e,f=0,r,s;
	cin>>n;
	int arr[n];
	vector< pair<int,int> > v;
	for(i=0;i<n;i++)
	{
		cin>>k;
		arr[i]=k;
		v.push_back(make_pair(k,i));
	}
	sort(v.begin(),v.end());
	map<int,int> mp;
	for(i=n-1;i>=0;i--)
	{
		f=0;
		if(mp[v[i].first])
		continue;
		mp[v[i].first]=1;
		k=v[i].first;
		l=v[i].second;
		r=v[i].second;
		//cout<<k<<" "<<l<<endl;
		while(l>=0 && arr[l]<=k)
		{
			mp[arr[l]]=1;
			c++;
			k=arr[l];
			l--;
			//cout<<"c="<<c<<endl;
		}
		k=v[i].first;
		while(r<n && arr[r]<=k)
		{
			f=1;
			mp[arr[r]]=1;
			c++;
			k=arr[r];
			r++;
		}
		if(m<c)
		{
			if(f)
			m=c-1;
			else
			m=c;
		}
		c=0;
	}
	cout<<m;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int i,j,k,t,l,n,m=0,a,b,c=0,d,e,f,r,s;
	cin>>n;
	int arr[n];
	vector< pair<int,int> > v;
	for(i=0;i<n;i++)
	{
		cin>>k;
		arr[i]=k;
		v.push_back(make_pair(k,i));
	}
	sort(v.begin(),v.end());
	map<int,int> mp;
	for(i=n-1;i>=0;i--)
	{
		if(mp[v[i].first])
		continue;
		mp[v[i].first]=1;
		k=v[i].first;
		l=v[i].second;
		r=v[i].second;
		//cout<<k<<" "<<l<<endl;
		while(l>=0 && arr[l]<=k)
		{
			mp[arr[l]]=1;
			c++;
			k=arr[l];
			l--;
			//cout<<"c="<<c<<endl;
		}
		k=v[i].first;
		while(r<n && arr[r]<=k)
		{
			mp[arr[r]]=1;
			c++;
			k=arr[r];
			r++;
		}
		if(m<c)
		{
			m=c;
		}
		c=0;
	}
	cout<<m-1;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int i,j,k,t,l,n,m=0,a,b,c=0,d,e,f=0,r,s;
	cin>>n;
	int arr[n];
	vector< pair<int,int> > v;
	for(i=0;i<n;i++)
	{
		cin>>k;
		arr[i]=k;
		v.push_back(make_pair(k,i));
	}
	sort(v.begin(),v.end());
	map<int,int> mp;
	for(i=n-1;i>=0;i--)
	{
		if(mp[v[i].first])
		continue;
		mp[v[i].first]=1;
		k=v[i].first;
		l=v[i].second;
		r=v[i].second;
		//cout<<k<<" "<<l<<endl;
		while(l>=0 && arr[l]<=k)
		{
			mp[arr[l]]=1;
			c++;
			k=arr[l];
			l--;
			//cout<<"c="<<c<<endl;
		}
		k=v[i].first;
		while(r<n && arr[r]<=k)
		{
			f=1;
			mp[arr[r]]=1;
			c++;
			k=arr[r];
			r++;
		}
		if(m<c)
		{
			if(f)
			m=c-1;
			else
			m=c;
		}
		c=0;
	}
	cout<<m;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int i,j,k,t,l,n,m=0,a,b,c=0,d,e,f,r,s;
	cin>>n;
	int arr[n];
	vector< pair<int,int> > v;
	for(i=0;i<n;i++)
	{
		cin>>k;
		arr[i]=k;
		v.push_back(make_pair(k,i));
	}
	sort(v.begin(),v.end());
	map<int,int> mp;
	for(i=n-1;i>=0;i--)
	{
		if(mp[v[i].first])
		continue;
		mp[v[i].first]=1;
		k=v[i].first;
		l=v[i].second;
		r=v[i].second;
		//cout<<k<<" "<<l<<endl;
		while(l>=0 && arr[l]<=k)
		{
			mp[arr[l]]=1;
			c++;
			k=arr[l];
			l--;
			//cout<<"c="<<c<<endl;
		}
		k=v[i].first;
		while(r<n && arr[r]<=k)
		{
			mp[arr[r]]=1;
			c++;
			k=arr[r];
			r++;
		}
		if(m<c)
		{
			m=c;
			c=0;
		}

	}
	cout<<m-1;
	return 0;
}


#include<bits/stdc++.h>
#define N 1005
using namespace std;
int main()
{
    int n;
    int a[N];
    int ans =0;
    int sum =0;
    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>>a[i];
    }
   int y = 0;

	while (y+1 < n&& a[y] >= a[y+1])
	{

		sum++;
		y++;
	}
    ans = max(ans , sum);
    sum =0;

    for(int i=1; i<n-1; i++)
    {
        int j=i;
        while(j-1 >=0 && a[j]>=a[j-1])
        {
            sum++;
            j--;
        }
        j=i;

        while(j <n-1 && a[j]>=a[j+1])
        {
            sum++;
            j++;
        }
        ans = max(ans , sum);
        sum =0;
    }
    int x = n-1;
    while(x >0 && a[x]>=a[x-1])
    {
        sum++;
        x--;
    }
    ans = max(ans , sum);
    cout<<ans+1;
    return 0;
}