/*
ID: Labib666
LANG: C++
Contest: Codeforces R246
Task: 4
*/

#include <bits/stdc++.h>

using namespace std;

#define LL long long
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define VI vector <int>
#define VLL vector <LL>
#define PQI priority_queue <int>
#define PQLL priority_queue <LL>
#define QI queue <int>
#define QLL queue <LL>
#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ size()
#define INF 1000000007
#define LINF 1000000000000000007
#define PI 2*asin(1)
#define EPS 1e-9

#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define REP(I,N)   FOR(I,0,N)
#define ALL(A)     ((A).begin(), (A).end())
#define MEM(A,V)   memset (A, (V), sizeof A)

int gcd (int a, int b){return (b > a) ? gcd (b,a) : (b == 0) ? a : gcd (b, a%b);}
int bitcount (int a) {return (a != 0) ? bitcount(a & (a-1)) + 1 : 0;}
LL bigmod (LL num, LL pow, LL prime) {
    if (pow == 0ll) return 1ll;
    LL ans = bigmod(num, pow/2ll, prime); ans = (ans*ans)%prime;
    if (pow%2ll) ans = (ans*num)%prime; return ans;
}

#define MAXN 100005
#define MAXLG 18

struct Data {
    int    e[2], p;
    bool operator < (const Data &d) const {
        return make_pair(e[0], e[1]) < make_pair(d.e[0], d.e[1]);
    }
} T[MAXN];

int P[MAXLG][MAXN], D[MAXN], N, stp, cnt, i, j;
char A[MAXN];

int B[MAXN];
void U(int pos) {
    while (pos <= N) {
        B[pos]++;
        pos += pos&-pos;
    }
    return;
}
int Q (int pos) {
    int ans = 0;
    while (pos != 0) {
        ans += B[pos];
        pos -= pos&-pos;
    }
    return ans;
}

vector <PII> ans;

int main()
{
    //freopen("input.txt", "r", stdin);
    gets(A);
    N = strlen (A);

    for (i = 0; i < N; i++)
        P[0][i] = A[i]-'a';

    for (stp = 1, cnt = 1; cnt >> 1 < N; cnt <<= 1, stp++) {
        for (i=0; i<N; i++) {
            T[i].e[0] = P[stp-1][i];
            T[i].e[1] = (i+cnt < N) ? P[stp-1][i+cnt] : -1;
            T[i].p = i;
        }
        sort (T, T+N);
        for (i=0;i<N;i++) {
            P[stp][T[i].p] = (i>0 && T[i].e[0] == T[i-1].e[0] && T[i].e[1] == T[i-1].e[1]) ? P[stp][T[i-1].p] : i;
        }
    }

    /*string BB = A;
    FOR(ii,0,N) {
        cout << BB.substr(T[ii].p) << endl;;
    }*/

    int pp = 0;

    for (i=1; i<N; i++) {
        if (T[i].p == 0) pp = i;
        int x = T[i-1].p, y = T[i].p;
        for (j = stp-1; j >= 0 && x < N && y < N; j--) {
            if (P[j][x] == P[j][y])
                x += (1<<j), y += (1<<j), D[i] += (1<<j);
        }
    }

    for (i=pp, j = D[i]; i > 0; i--) {
        j = min (j, D[i]);
        if (j <= 0) break;
        U(j);
    }
    if (pp < N-1) {
        for (i=pp+1, j = D[i]; i < N; i++) {
            j = min (j, D[i]);
            if (j <= 0) break;
            U(j);
        }
    }

    for (i=pp, j = D[i]; i > 0; i--) {
        j = min (j, D[i]);
        if (j <= 0) break;

        int kk = N-T[i-1].p;
        if (kk == j) {
            ans.PB (MP (kk, Q(N)-Q(kk-1)+1));
        }
    }

    if (pp < N-1) {
        for (i=pp+1, j = D[i]; i < N; i++) {
            j = min (j, D[i]);
            if (j <= 0) break;

            //cout << i << " " << j << endl;

            int kk = N-T[i].p;
            if (kk == j) {
                ans.PB (MP (kk, Q(N)-Q(kk-1)+1));
            }
        }
    }

    ans.PB (MP(N,1));

    cout << ans.SZ << endl;
    sort (ans.begin(), ans.end());

    for (i=0; i<ans.SZ; i++)
        cout << ans[i].X << " " << ans[i].Y << endl;

    return 0;
}


/*
ID: Labib666
LANG: C++
Contest: Codeforces R246
Task: 4
*/

#include <bits/stdc++.h>

using namespace std;

#define LL long long
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define VI vector <int>
#define VLL vector <LL>
#define PQI priority_queue <int>
#define PQLL priority_queue <LL>
#define QI queue <int>
#define QLL queue <LL>
#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ size()
#define INF 1000000007
#define LINF 1000000000000000007
#define PI 2*asin(1)
#define EPS 1e-9

#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define REP(I,N)   FOR(I,0,N)
#define ALL(A)     ((A).begin(), (A).end())
#define MEM(A,V)   memset (A, (V), sizeof A)

int gcd (int a, int b){return (b > a) ? gcd (b,a) : (b == 0) ? a : gcd (b, a%b);}
int bitcount (int a) {return (a != 0) ? bitcount(a & (a-1)) + 1 : 0;}
LL bigmod (LL num, LL pow, LL prime) {
    if (pow == 0ll) return 1ll;
    LL ans = bigmod(num, pow/2ll, prime); ans = (ans*ans)%prime;
    if (pow%2ll) ans = (ans*num)%prime; return ans;
}

#define  MAXLG       18
#define  MAXN        100005

struct node{
    int id, a[2];
};

bool cmp(node a, node b){
    if(a.a[0] != b.a[0]) return a.a[0]< b.a[0];
    return a.a[1] < b.a[1];
}

int P[MAXLG][MAXN],N;
node L[MAXN];

// Finding the Longest Common Prefix.
int LCP(int x, int y){
    int i,ans;
    if(x == y) return N - x;
    ans =  0;

    for(i = 17; i >= 0; i--){
        if(((x + (1<<i)) > N) || ((y + (1<<i))> N)) continue;

        if(P[i][x] == P[i][y]){
            ans = ans + (1<<i);
            x = x + (1<<i);
            y = y + (1<<i);
        }
    }

    return ans;
}

void SuffixArray(string S){
      // Suffix Array
      int i,j,cnt;

    N = S.size();
    for(i = 0; i < N; i++)
        P[0][i] = S[i] - 'A';

    for(j = 1, cnt = 1 ; cnt >> 1 < N ;j++, cnt <<=1){
        for(i = 0; i < N ; i++){
            L[i].id = i;
            L[i].a[0] = P[j-1][i];
            if(i + cnt < N) L[i].a[1] = P[j-1][i+cnt];
            else L[i].a[1] = -1;
        }
        sort(L, L+ N, cmp);
        P[j][L[0].id] = 0;
        for(i = 1; i < N; i++){
            if(L[i].a[0] == L[i-1].a[0] && L[i].a[1] == L[i-1].a[1])
                P[j][L[i].id] = P[j][L[i-1].id];
            else P[j][L[i].id] = P[j][L[i-1].id] + 1;
        }
    }

    return;
}

int pos[MAXN],rec[MAXN];

int AB(int a){
    if(a<0) return -a;
    return a;
}
int main(){

    string S;
    int i,r;
    cin >> S;
    SuffixArray(S);
    N = S.size();

    for(i = 0; i < N; i++){
        if(L[i].id == 0) r= i;
        pos[L[i].id] = i;
    }

    int j,len,now;
    memset(rec, 0, sizeof(rec));
    i = r;
    j = r;
    rec[N] = 1;

    for(len = N; len > 0; len--){
        i  = pos[N-len];
        if(i > r) continue;
        now = LCP(L[i].id, L[r].id);
        if(now != len) continue;
        while(j < N-1){
            if(LCP(L[j+1].id,L[r].id)>=len) j++;
            else break;
        }
        rec[len] = j - i + 1;

    }

    i = r; j = r;
    for(len = N; len>0; len--){
        j = pos[N-len];
        if(j < r) continue;
        now = LCP(L[r].id, L[j].id);
        if(now != len) continue;
        while(i > 0){
            if(LCP(L[i-1].id, L[r].id) >= len) i--;
            else break;
        }
        rec[len] = j - i +1;
    }

    for(len = 1; len <= N; len++){
        if(rec[len]==0) continue;
        printf("%d %d\n",len, rec[len]);
    }
    return 0;
}


/*
ID: Labib666
LANG: C++
Contest: Codeforces R246
Task: 4
*/

#include <bits/stdc++.h>

using namespace std;

#define LL long long
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define VI vector <int>
#define VLL vector <LL>
#define PQI priority_queue <int>
#define PQLL priority_queue <LL>
#define QI queue <int>
#define QLL queue <LL>
#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ size()
#define INF 1000000007
#define LINF 1000000000000000007
#define PI 2*asin(1)
#define EPS 1e-9

#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define REP(I,N)   FOR(I,0,N)
#define ALL(A)     ((A).begin(), (A).end())
#define MEM(A,V)   memset (A, (V), sizeof A)

int gcd (int a, int b){return (b > a) ? gcd (b,a) : (b == 0) ? a : gcd (b, a%b);}
int bitcount (int a) {return (a != 0) ? bitcount(a & (a-1)) + 1 : 0;}
LL bigmod (LL num, LL pow, LL prime) {
    if (pow == 0ll) return 1ll;
    LL ans = bigmod(num, pow/2ll, prime); ans = (ans*ans)%prime;
    if (pow%2ll) ans = (ans*num)%prime; return ans;
}

#define MAXN 100005
#define MAXLG 18

struct Data {
    int    e[2], p;
    bool operator < (const Data &d) const {
        return make_pair(e[0], e[1]) < make_pair(d.e[0], d.e[1]);
    }
} T[MAXN];

int P[MAXLG][MAXN], D[MAXN], N, stp, cnt, i, j;
char A[MAXN];

int B[MAXN];
void U(int pos) {
    while (pos <= N) {
        B[pos]++;
        pos += pos&-pos;
    }
    return;
}
int Q (int pos) {
    int ans = 0;
    while (pos != 0) {
        ans += B[pos];
        pos -= pos&-pos;
    }
    return ans;
}

vector <PII> ans;

int main()
{
    //freopen("input.txt", "r", stdin);
    gets(A);
    N = strlen (A);

    for (i = 0; i < N; i++)
        P[0][i] = A[i]-'A';

    for (stp = 1, cnt = 1; cnt >> 1 < N; cnt <<= 1, stp++) {
        for (i=0; i<N; i++) {
            T[i].e[0] = P[stp-1][i];
            T[i].e[1] = (i+cnt < N) ? P[stp-1][i+cnt] : -1;
            T[i].p = i;
        }
        sort (T, T+N);
        for (i=0;i<N;i++) {
            P[stp][T[i].p] = (i>0 && T[i].e[0] == T[i-1].e[0] && T[i].e[1] == T[i-1].e[1]) ? P[stp][T[i-1].p] : i;
        }
    }

    /*string BB = A;
    FOR(ii,0,N) {
        cout << BB.substr(T[ii].p) << endl;;
    }*/

    int pp = 0;

    for (i=1; i<N; i++) {
        if (T[i].p == 0) pp = i;
        int x = T[i-1].p, y = T[i].p;
        for (j = stp-1; j >= 0 && x < N && y < N; j--) {
            if (P[j][x] == P[j][y])
                x += (1<<j), y += (1<<j), D[i] += (1<<j);
        }
    }

    for (i=pp, j = D[i]; i > 0; i--) {
        j = min (j, D[i]);
        if (j <= 0) break;
        U(j);
    }
    if (pp < N-1) {
        for (i=pp+1, j = D[i]; i < N; i++) {
            j = min (j, D[i]);
            if (j <= 0) break;
            U(j);
        }
    }

    for (i=pp, j = D[i]; i > 0; i--) {
        j = min (j, D[i]);
        if (j <= 0) break;

        int kk = N-T[i-1].p;
        if (kk == j) {
            ans.PB (MP (kk, Q(N)-Q(kk-1)+1));
        }
    }

    if (pp < N-1) {
        for (i=pp+1, j = D[i]; i < N; i++) {
            j = min (j, D[i]);
            if (j <= 0) break;

            int kk = N-T[i].p;
            if (kk == j) {
                ans.PB (MP (kk, Q(N)-Q(kk-1)+1));
            }
        }
    }

    ans.PB (MP(N,1));

    cout << ans.SZ << endl;
    sort (ans.begin(), ans.end());

    for (i=0; i<ans.SZ; i++)
        cout << ans[i].X << " " << ans[i].Y << endl;

    return 0;
}


/*
ID: Labib666
LANG: C++
Contest: Codeforces R246
Task: 4
*/

#include <bits/stdc++.h>

using namespace std;

#define LL long long
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define VI vector <int>
#define VLL vector <LL>
#define PQI priority_queue <int>
#define PQLL priority_queue <LL>
#define QI queue <int>
#define QLL queue <LL>
#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ size()
#define INF 1000000007
#define LINF 1000000000000000007
#define PI 2*asin(1)
#define EPS 1e-9

#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define REP(I,N)   FOR(I,0,N)
#define ALL(A)     ((A).begin(), (A).end())
#define MEM(A,V)   memset (A, (V), sizeof A)

int gcd (int a, int b){return (b > a) ? gcd (b,a) : (b == 0) ? a : gcd (b, a%b);}
int bitcount (int a) {return (a != 0) ? bitcount(a & (a-1)) + 1 : 0;}
LL bigmod (LL num, LL pow, LL prime) {
    if (pow == 0ll) return 1ll;
    LL ans = bigmod(num, pow/2ll, prime); ans = (ans*ans)%prime;
    if (pow%2ll) ans = (ans*num)%prime; return ans;
}

#define  MAXLG       18
#define  MAXN        100005

struct node{
    int id, a[2];
};

bool cmp(node a, node b){
    if(a.a[0] != b.a[0]) return a.a[0]< b.a[0];
    return a.a[1] < b.a[1];
}

int P[MAXLG][MAXN],N;
node L[MAXN];

// Finding the Longest Common Prefix.
int LCP(int x, int y){
    int i,ans;
    if(x == y) return N - x;
    ans =  0;

    for(i = 17; i >= 0; i--){
        if(((x + (1<<i)) > N) || ((y + (1<<i))> N)) continue;

        if(P[i][x] == P[i][y]){
            ans = ans + (1<<i);
            x = x + (1<<i);
            y = y + (1<<i);
        }
    }

    return ans;
}

void SuffixArray(string S){
      // Suffix Array
      int i,j,cnt;

    N = S.size();
    for(i = 0; i < N; i++)
        P[0][i] = S[i] - 'A';

    for(j = 1, cnt = 1 ; cnt >> 1 < N ;j++, cnt <<=1){
        for(i = 0; i < N ; i++){
            L[i].id = i;
            L[i].a[0] = P[j-1][i];
            if(i + cnt < N) L[i].a[1] = P[j-1][i+cnt];
            else L[i].a[1] = -1;
        }
        sort(L, L+ N, cmp);
        P[j][L[0].id] = 0;
        for(i = 1; i < N; i++){
            if(L[i].a[0] == L[i-1].a[0] && L[i].a[1] == L[i-1].a[1])
                P[j][L[i].id] = P[j][L[i-1].id];
            else P[j][L[i].id] = P[j][L[i-1].id] + 1;
        }
    }

    return;
}

int pos[MAXN],rec[MAXN];

int AB(int a){
    if(a<0) return -a;
    return a;
}
int main(){

    string S;
    int i,r;
    cin >> S;
    SuffixArray(S);
    N = S.size();

    for(i = 0; i < N; i++){
        if(L[i].id == 0) r= i;
        pos[L[i].id] = i;
    }

    int j,len,now;
    memset(rec, 0, sizeof(rec));
    i = r;
    j = r;
    rec[N] = 1;

    for(len = N; len > 0; len--){
        i  = pos[N-len];
        if(i > r) continue;
        now = LCP(L[i].id, L[r].id);
        if(now != len) continue;
        while(j < N-1){
            if(LCP(L[j+1].id,L[r].id)>=len) j++;
            else break;
        }
        rec[len] = j - i + 1;

    }

    i = r; j = r;
    for(len = N; len>0; len--){
        j = pos[N-len];
        if(j < r) continue;
        now = LCP(L[r].id, L[j].id);
        if(now != len) continue;
        while(i > 0){
            if(LCP(L[i-1].id, L[r].id) >= len) i--;
            else break;
        }
        rec[len] = j - i +1;
    }

    int kkk = 0;
    for(len = 1; len <= N; len++){
        if(rec[len]==0) continue;
        kkk++;
    }

    cout << kkk << endl;

    for(len = 1; len <= N; len++){
        if(rec[len]==0) continue;
        printf("%d %d\n",len, rec[len]);
    }
    return 0;
}


/*
ID: Labib666
LANG: C++
Contest: Codeforces R246
Task: 4
*/

#include <bits/stdc++.h>

using namespace std;

#define LL long long
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define VI vector <int>
#define VLL vector <LL>
#define PQI priority_queue <int>
#define PQLL priority_queue <LL>
#define QI queue <int>
#define QLL queue <LL>
#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ size()
#define INF 1000000007
#define LINF 1000000000000000007
#define PI 2*asin(1)
#define EPS 1e-9

#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define REP(I,N)   FOR(I,0,N)
#define ALL(A)     ((A).begin(), (A).end())
#define MEM(A,V)   memset (A, (V), sizeof A)

int gcd (int a, int b){return (b > a) ? gcd (b,a) : (b == 0) ? a : gcd (b, a%b);}
int bitcount (int a) {return (a != 0) ? bitcount(a & (a-1)) + 1 : 0;}
LL bigmod (LL num, LL pow, LL prime) {
    if (pow == 0ll) return 1ll;
    LL ans = bigmod(num, pow/2ll, prime); ans = (ans*ans)%prime;
    if (pow%2ll) ans = (ans*num)%prime; return ans;
}

#define MAXN 100005
#define MAXLG 18

struct Data {
    int    e[2], p;
    bool operator < (const Data &d) const {
        return make_pair(e[0], e[1]) < make_pair(d.e[0], d.e[1]);
    }
} T[MAXN];                                             //** T = Sorted suffixes

int P[MAXLG][MAXN], D[MAXN], N, stp;                   //** P = rank of suffix , D = LCP of consecutively ranked suffixes
string A;                                             //** A = given string

vector <PII> ans;
int B[MAXN];

void U(int pos) {
    while (pos <= N) {
        B[pos]++;
        pos += pos&-pos;
    }
    return;
}

int Q (int pos) {
    int ans = 0;
    while (pos != 0) {
        ans += B[pos];
        pos -= pos&-pos;
    }
    return ans;
}

void SuffixArray(string A) {
    int cnt, i, j;

    for (i = 0; i < N; i++)
        P[0][i] = A[i]-'A';                            //**  <- Change in case of uppercase letters

    for (stp = 1, cnt = 1; cnt >> 1 < N; cnt <<= 1, stp++) {
        for (i=0; i<N; i++) {
            T[i].e[0] = P[stp-1][i];
            T[i].e[1] = (i+cnt < N) ? P[stp-1][i+cnt] : -1;
            T[i].p = i;
        }

        sort (T, T+N);
        for (i=0;i<N;i++) {
            P[stp][T[i].p] = (i>0 && T[i].e[0] == T[i-1].e[0] && T[i].e[1] == T[i-1].e[1]) ? P[stp][T[i-1].p] : i;
        }
    }

    return;
}

int LCP(int x, int y) {
    int ans = 0;
    for (int j = stp-1; j >= 0 && x < N && y < N; j--) {
        if (P[j][x] == P[j][y])
            x += (1<<j), y += (1<<j), ans += (1<<j);
    }
    return ans;
}

int main()
{
    int i, j, kk, pp = 0;

    cin >> A;
    N = A.size();

    SuffixArray(A);

    for (int i=1; i<N; i++) {
        int x = T[i-1].p, y = T[i].p;
        if (y == 0) pp = i;
        D[i] = LCP(x, y);
    }

    for (i=pp, j = D[i]; i > 0; i--) {
        j = min (j, D[i]);
        if (j <= 0) break;
        U(j);
    }

    for (i=pp+1, j = D[i]; i < N; i++) {
        j = min (j, D[i]);
        if (j <= 0) break;
        U(j);
    }

    for (i = pp, j = D[i]; i > 0; i--) {
        j = min (j, D[i]);
        if (j <= 0) break;

        int kk = N-T[i-1].p;
        if (kk == j) {
            ans.PB (MP (kk, Q(N)-Q(kk-1)+1));
        }
    }

    for (i=pp+1, j = D[i]; i < N; i++) {
        j = min (j, D[i]);
        if (j <= 0) break;

        int kk = N-T[i].p;
        if (kk == j) {
            ans.PB (MP (kk, Q(N)-Q(kk-1)+1));
        }
    }

    ans.PB (MP(N,1));

    cout << ans.SZ << endl;
    sort (ans.begin(), ans.end());

    for (i=0; i<ans.SZ; i++)
        cout << ans[i].X << " " << ans[i].Y << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std ;

int Z[1000200];
int occ[100200];
int B = 1e4 + 7;
long long M = 1e9 + 7;
int n;
string text;
void Build_Z()
{
	Z[0] = n;
    for(int i = 1 , l = 0 ,r = 0 ; i < n ; i++)
    {
        if(i < r)Z[i] = min(r - i + 1 , Z[i-l]);
        while(i + Z[i] < n && text[Z[i]] == text[i+Z[i]])
            Z[i]++;
        if(i + Z[i] - 1 > r)
        {
            l = i ;
            r = i + Z[i] -1;
        }
    }
}
int main()
{

    memset(Z,0,sizeof Z);
    cin >> text;
    n = text.size();
    Build_Z();
    memset(occ,0,sizeof occ);
    map <long long , int > mp;
    for(int i = 0 ; i < n ; i++)
    {

        int ht = 0; int hp = 0;
        int j ;
        if(Z[i] > 0)
        {
        ht = 0;
        for(j = i ; j < i + Z[i] ; j++)
            ht = (ht*B + text[j])%M;
        if(!mp.count(ht))
        {
		mp[ht] = Z[i];
        for(int k = 0 ; k < n ; k++)
        {
            hp = 0;
            for(int f = k ; f < k + Z[i] ; f++)
                hp = (hp*B + text[f])%M;

            if(hp == ht){occ[Z[i]]++;}

        }
        }

        }
    }
    int out = 0;
    for(int i = 1 ; i < 100200  ;i++)
        if(occ[i] > 0 && Z[n-i] == i)out++;
    cout << out << endl;
    for(int i = 1 ; i < 100200 ; i++)
        if(occ[i] > 0 && Z[n-i] == i)cout << i << " " << occ[i] << endl;

    return 0;
}


    #include <bits/stdc++.h>

    using namespace std ;

    int Z[100200];
    int occ[100200];
    int B = 256;

    int n;
    string text;

    int main()
    {

        cin >> text;
        n = text.size();
        for(int i = 0 , l = 0 ,r = 0 ; i < n ; i++)
        {
            if(i <= r)Z[i] = min(r - i + 1 , Z[i-l]);
            while(i + Z[i] < n && text[Z[i]] == text[i+Z[i]])
                Z[i]++;
            if(i + Z[i] - 1 > r)
            {
                l = i ;
                r = i + Z[i] -1;
            }
        }
        for(int i = 0 ; i < n ; i++)
        {
                occ[Z[i]]++;
        }
        int out = 0;
        for (int i = n ; i >= 1; i--)
        {
            if(Z[n-i] == i && occ[i])out++;

            occ[i] += occ[i+1];
        }
        printf("%d\n",out);
        for(int i = 1 ; i <= n ; i++)if(occ[i] && Z[n-i] == i)printf("%d %d\n",i,occ[i]);
        return 0;
    }


#include <bits/stdc++.h>

using namespace std ;

int Z[100200];
int occ[100200];
int B = 256;

int n;
string text;

int main()
{

    cin >> text;
    n = text.size();
    for(int i = 0 , l = 0 ,r = 0 ; i < n ; i++)
    {
        if(i < r)Z[i] = min(r - i + 1 , Z[i-l]);
        while(i + Z[i] < n && text[Z[i]] == text[i+Z[i]])
            Z[i]++;
        if(i + Z[i] - 1 > r)
        {
            l = i ;
            r = i + Z[i] -1;
        }
    }
    for(int i = 0 ; i < n ; i++)
    {
            occ[Z[i]]++;
    }
    int out = 0;
    for (int i = n ; i >= 1; i--)
    {
        if(Z[n-i] == i && occ[i])out++;

        occ[i] += occ[i+1];
    }
    cout << out << endl;
    for(int i = 1 ; i <= n ; i++)if(occ[i] && Z[n-i] == i)cout << i << " " << occ[i] << endl;
    return 0;
}


    #include <bits/stdc++.h>

    using namespace std ;

    int Z[100200];
    int occ[100200];
    int B = 256;

    int n;
    string text;

    int main()
    {

        cin >> text;
        n = text.size();
        for(int i = 0 , l = 0 ,r = 0 ; i < n ; i++)
        {
            if(i < r)Z[i] = min(r - i + 1 , Z[i-l]);
            while(i + Z[i] < n && text[Z[i]] == text[i+Z[i]])
                Z[i]++;
            if(i + Z[i] - 1 > r)
            {
                l = i ;
                r = i + Z[i] -1;
            }
        }
        for(int i = 0 ; i < n ; i++)
        {
                occ[Z[i]]++;
        }
        int out = 0;
        for (int i = n ; i >= 1; i--)
        {
            if(Z[n-i] == i && occ[i])out++;

            occ[i] += occ[i+1];
        }
        printf("%d\n",out);
        for(int i = 1 ; i <= n ; i++)if(occ[i] && Z[n-i] == i)printf("%d %d\n",i,occ[i]);
        return 0;
    }


#include <bits/stdc++.h>

using namespace std ;

int Z[100200];
int occ[100200];
int B = 256;

int n;
string text;

int main()
{

    cin >> text;
    n = text.size();
    for(int i = 0 , l = 0 ,r = 0 ; i < n ; i++)
    {
        if(i < r)Z[i] = min(r - i + 1 , Z[i-l]);
        while(i + Z[i] < n && text[Z[i]] == text[i+Z[i]])
            Z[i]++;
        if(i + Z[i] - 1 > r)
        {
            l = i ;
            r = i + Z[i] -1;
        }
    }
    for(int i = 0 ; i < n ; i++)
    {
        if(Z[i] > 0)
        {
            occ[Z[i]]++;
        }
    }
    int out = 0;
    for (int i = n ; i >= 1; i--)
    {
        if(Z[n-i] == i && occ[i])out++;

        occ[i] += occ[i+1];
    }
    cout << out << endl;
    for(int i = 1 ; i <= n ; i++)if(occ[i] && Z[n-i] == i)cout << i << " " << occ[i] << endl;
    return 0;
}


    #include <bits/stdc++.h>

    using namespace std ;

    int Z[100200];
    int occ[100200];

    int n;
    string text;

    int main()
    {

        cin >> text;
        n = text.size();
        Z[0] = n;
        for(int i = 1 , l = 0 ,r = 0 ; i < n ; i++)
        {
            if(i <= r)Z[i] = min(r - i + 1 , Z[i-l]);
            while(i + Z[i] < n && text[Z[i]] == text[i+Z[i]])
                Z[i]++;
            if(i + Z[i] - 1 > r)
            {
                l = i ;
                r = i + Z[i] -1;
            }
        }
        for(int i = 0 ; i < n ; i++)
        {
                occ[Z[i]]++;
        }
        int out = 0;
        for (int i = n ; i >= 1; i--)
        {
            if(Z[n-i] == i && occ[i])out++;

            occ[i] += occ[i+1];
        }
        printf("%d\n",out);
        for(int i = 1 ; i <= n ; i++)if(occ[i] && Z[n-i] == i)printf("%d %d\n",i,occ[i]);
        return 0;
    }


#include <cstdio>
#include <cstring>
int const MAX = 1e5 + 2;
char str[MAX];
int next[MAX], re[MAX], le[MAX], sub[MAX];;
int len, count;

void get_next()
{
    int i = 0, j = -1;
    next[0] = -1;
    while(str[i] != '\0')
    {
        if(j == -1 || str[i] == str[j])
        {
            j++;
            i++;
            next[i] = j;
        }
        else
            j = next[j];
    }
}

void kmp()
{
    get_next();
    len = strlen(str);
    memset(re,0,sizeof(re));
    for(int i = 1; i <= len; i++)
        re[i] = 1;
    int temp = len;
    for(; temp > 0; temp--)
        if(next[temp])
            re[ next[temp] ] += re[temp];
    count = 0;
    le[count] = len;
    sub[count++] = 1;
    len = next[len];
    while(len)
    {
        le[count] = len;
        sub[count++] = re[len];
        len = next[len];
    }
}

int main()
{
    while(scanf("%s", str) != EOF)
    {
        kmp();
        printf("%d\n",count);
        for(int i = count - 1; i >= 0; i--)
            printf("%d %d\n",le[i], sub[i]);
    }
}


#include <cstdio>
#include <cstring>
int const MAX = 1e5 + 2;
char str[MAX];
int next[MAX], re[MAX], le[MAX], sub[MAX];;
int len, count;

void get_next()
{
    int i = 0, j = -1;
    next[0] = -1;
    while(str[i] != '\0')
    {
        if(j == -1 || str[i] == str[j])
        {
            j++;
            i++;
            next[i] = j;
        }
        else
            j = next[j];
    }
}

void kmp()
{
    get_next();
    memset(re, 0, sizeof(re));
    int i, j = 0;
    for(i = 0; i < len; i++)
    {
        if(str[i] == str[j])
        {
            j++;
            re[j]++;
        }

        //printf("i = %d,   j = %d \n re[j] = %d\n",i, j, re[j]);
    }
    int temp = j;
    for(temp = len; temp >= 1; temp--)
        if(next[temp])
            re[ next[temp] ] += re[temp];
    j = next[j];
    le[count] = len;
    sub[count++] = 1;
    while(j)
    {
        le[count] = j;
        sub[count++] = re[j];
        j = next[j];
    }
}

int main()
{
    while(scanf("%s", str) != EOF)
    {
        count = 0;
        len = strlen(str);
        kmp();
        printf("%d\n",count);
        for(int i = count - 1; i >= 0; i--)
            printf("%d %d\n",le[i], sub[i]);
    }
}


/*************************************************************************
	> File Name: A.cpp
	> Author: Steven
	> Mail: stevendavidyou@gmail.com
	> Created Time: 2014年08月22日 星期五 12时40分17秒
 ************************************************************************/

#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<queue>

using namespace std;

#define maxn 10010

char s[maxn];
int next[maxn];
int fff[maxn];

void get_next(int l)
{
    memset(next,0,sizeof(next));
    int i,j;
    i=0;
    j=next[0]=-1;
    while(i<l)
    {
        if(j==-1||s[i]==s[j])
        {
            i++;j++;
            next[i]=j;
        }
        else
            j=next[j];
    }
}

int kmp_match(int l)
{
    get_next(l);
    int i,j;
    int cnt=0;
    i=j=0;
    while(s[i]!='\0')
    {
        if(j==-1||s[i]==s[j])
        {
            i++;j++;
        }
        else
            j=next[j];
        if(j==l)
        {
            cnt++;
            j=0;
        }
    }
    return cnt;
}

int main()
{
    while(scanf("%s",s)!=EOF)
    {
        getchar();
        memset(fff,0,sizeof(fff));
        int len=strlen(s);
        int l=1;
        int ans=0;
        while(l<=len)
        {
            int ok=1;
            for(int i=0;i<l;i++)
            {
                if(s[i]!=s[len-l+i])
                {
                    ok=0;
                    break;
                }
            }
            if(ok)
            {
                int cnt=kmp_match(l);
                ans++;
                fff[l]=cnt;
            }
            l++;
        }
        printf("%d\n",ans);
        for(int i=1;i<=len;i++)
        {
            if(fff[i])
                printf("%d %d\n",i,fff[i]);
        }
    }
    return 0;
}


#include<cstdio>
#include<cstring>
char c[100010],re[100010],dp[100010];
int next[100010];
void getJump() {
	int k = 0;
	int n = strlen(c+1);
	for (int i = 2; i <= n; i++)
	{
		while (k && c[i] != c[k+1])
			k = next[k];

		if (c[i] == c[k+1])
			k++;
		next[i] = k;
	}
}
int main()
{

	scanf("%s",c+1);
	next[0]=next[1]=0;
	getJump();
	int i,j,k;
	int len=strlen(c+1);
	int co=0;
	for(i=next[len];i;i=next[i])
		re[co++]=i;
	memset(dp,0,sizeof(dp));
	printf("%d\n",co+1);
	for(i=len;i;i--)
	{
		dp[i]++;
		dp[next[i]]+=dp[i];
	}
	for(i=co-1;i>=0;i--)
		printf("%d %d\n",re[i],dp[re[i]]);
	printf("%d %d\n",len,dp[len]);
	return 0;
}


//
//  main.cpp
//  a
//
//  Created by huang chengbo on 14-8-22.
//  Copyright (c) 2014年 huang chengbo. All rights reserved.
//

#include <cstdio>
#include <cstring>
char a[10010];
char p[10010];
int f[10010];
void fail(const char* pat, int* f){
    const int len=strlen(pat);
    f[0]=-1;
    for (int j=1; j < len; j++){
        if (pat[j] == pat[f[j-1]+1])
            f[j] = f[j-1]+1;
        else {
            int i=f[j-1];
            while ( i >=0 && pat[j] != pat[i+1] )
                i = f[i];
            if (pat[j] ==pat[i+1])
                f[j] = i+1;
            else
                f[j] = -1;
        }
    }
}

int search(const char* tg, const char *pt, const int* f){
    const int ptLen=strlen(pt);
    const int tgLen = strlen(tg);
    int tgPos=0,ptPos=0;
    for (; tgPos < tgLen && ptPos < ptLen;) {
        if (tg[tgPos] == pt[ptPos]){
            ptPos++;
            tgPos++;
        }
        else {
            if (ptPos == 0)
                tgPos ++;
            else
                ptPos = f[ptPos-1] + 1;
        }
    }
    return  ptPos < ptLen ? -1: tgPos - ptLen;
}

int count(const char* tg, const char *pt, const int* f){
    const int ptLen=strlen(pt);
    const int tgLen = strlen(tg);
    int tgPos=0,ptPos=0,count=0;
    for (; tgPos < tgLen;) {
        if (tg[tgPos] == pt[ptPos]){
            ptPos++;
            tgPos++;
        }
        else {
            if (ptPos == 0)
                tgPos ++;
            else
                ptPos = f[ptPos-1] + 1;
        }
        if (ptPos >= ptLen ){
            count ++;
            ptPos=f[ptLen-1] +1;
        }
    }
    return  count;
}
int result_index[10010];
int result_num[10010];
int main(int argc, const char * argv[])
{
    scanf("%s",a);
    size_t size=strlen(a);
    bool flag=false;
    int cnt=0;
    fail(a, f);
    for(int i=0;i<size;++i){
        flag=false;
        p[i]=a[i];
        if(a[i]==a[0]){
            for(int j=i,k=0;j>i/2;--j,++k){
                if(a[j]!=a[k]){
                    flag=true;
                    break;
                }
            }
            if(!flag){
                p[i+1]='\0';
                result_index[cnt]=i+1;
                result_num[cnt]=count(a, p, f);
                ++cnt;
            }
        }
    }
    printf("%d\n",cnt);
    for(int i=0;i<cnt;++i){
        printf("%d %d\n",result_index[i],result_num[i]);
    }
    return 0;
}


/*************************************************************************
	> File Name: A.cpp
	> Author: Steven
	> Mail: stevendavidyou@gmail.com
	> Created Time: 2014年08月22日 星期五 12时40分17秒
 ************************************************************************/

#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<queue>

using namespace std;

#define maxn 10010

char s[maxn];
int next[maxn];
int fff[maxn];

void get_next(char *str)
{
    memset(next,0,sizeof(next));
    int i,j;
    i=0;
    j=next[0]=-1;
    int len=strlen(str);
    while(i<len)
    {
        if(j==-1||str[i]==str[j])
        {
            i++;j++;
            next[i]=j;
        }
        else
            j=next[j];
    }
}

int kmp_match(char *p)
{
    memset(next,0,sizeof(next));
    get_next(p);
    int len=strlen(p);
    int i,j;
    i=j=0;
    int cnt=0;
    while(s[i]!='\0')
    {
        if(s[i]==p[j]||j==-1)
        {
            i++;j++;
        }
        else
            j=next[j];
        if(j==len)
        {
            j=0;
            for(int k=i-len+1;k<=i;k++)
            {
                if(s[k]==p[0]);
                {
                    i=k;
                    break;
                }
            }
            cnt++;
        }
    }
    return cnt;
}

int main()
{
    while(scanf("%s",s)!=EOF)
    {
        getchar();
        memset(fff,0,sizeof(fff));
        int len=strlen(s);
        int l=1;
        int ans=0;
        while(l<=len)
        {
            int ok=1;
            for(int i=0;i<l;i++)
            {
                if(s[i]!=s[len-l+i])
                {
                    ok=0;
                    break;
                }
            }
            if(ok)
            {
                char tmp[maxn];
                for(int j=0;j<l;j++)
                    tmp[j]=s[j];
                tmp[l]='\0';
                int cnt=kmp_match(tmp);
                ans++;
                fff[l]=cnt;
            }
            l++;
        }
        printf("%d\n",ans);
        for(int i=1;i<=len;i++)
        {
            if(fff[i])
                printf("%d %d\n",i,fff[i]);
        }
    }
    return 0;
}


#include <cstdio>
#include <cstring>

const int LEN = 100010;

char str[LEN];
int next[LEN];
int ans[LEN];
int pos[LEN];
int p = 0;
int len;

void getnext()
{
	next[0] = 0;
	for(int i = 1, q = 0; i < len; i++){
		while(q > 0 && str[i] != str[i-1])
			q = next[q-1];
		if (str[i] == str[i-1])
			q++;
		next[i] = q;
	}
}

int match(int lenp)
{
	int res = 0;
	int lens = len;
	for(int i = 0, j = 0; i < lens; i++){
		while(j > 0 && str[i] != str[j])
			j = next[j-1];
		if (str[i] == str[j])
			j++;
		if (j == lenp){
			res++;
//			printf("i=%d,j=%d\n", i, j);
			j = next[j-1];
			i = i - lenp + 1;
//			printf("houj=%d\n", j);
		}
	}
	return res;
}

int main()
{
	scanf("%s", str);
	len = strlen(str);
	for(int i = 0; i < len; i++){
		if (strncmp(str, str+len-1-i, i+1) == 0){
			pos[p] = i + 1;
			ans[p] = match(i+1);
			p++;
		}
	}
	printf("%d\n", p);
	for(int i = 0; i < p; i++){
		printf("%d %d\n", pos[i], ans[i]);
	}
	return 0;
}


#include<cstdio>
#include<cstring>
char c[100010];
void getJump(int *next) {
	int k = 0;
	int n = strlen(c+1);
	for (int i = 2; i <= n; i++)
	{
		while (k && c[i] != c[k+1])
			k = next[k];

		if (c[i] == c[k+1])
			k++;
		next[i] = k;
	}
}
int main()
{
	int next[100010];
	scanf("%s",c+1);
	next[0]=next[1]=0;
	getJump(next);
	int i,j,k;
	int len=strlen(c+1);
	int st=next[len];
	int re[10010],co=0;
	for(i=next[len];i;i=next[i])
		re[co++]=i;
	int dp[10010];
	memset(dp,0,sizeof(dp));
	printf("%d\n",co+1);
	for(i=len;i;i--)
	{
		dp[i]++;
		dp[next[i]]+=dp[i];
	}
	for(i=co-1;i>=0;i--)
		printf("%d %d\n",re[i],dp[re[i]]);
	printf("%d %d\n",len,dp[len]);
}


// file name: 25.cpp //
// author: kereo //
// create time:  2014年08月23日 星期六 17时39分50秒 //
//***********************************//
#include<iostream>
#include<cstdio>
#include<cstring>
#include<queue>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<cmath>
#include<algorithm>
using namespace std;
typedef long long ll;
const int MAXN=100000+100;
#define L(x) (x<<1)
#define R(x) (x<<1|1)
char str[MAXN];
int fail[MAXN],ans[MAXN],dp[MAXN];
int main()
{
	while(~scanf("%s",str)){
		int n=strlen(str);
		fail[0]=fail[1]=0;
		for(int i=1;i<n;i++){
			int j=fail[i];
			while(j && str[i]!=str[j])  j=fail[j];
			fail[i+1]=str[i] == str[j] ? j+1 : 0;
		}
		int cnt=0;
		memset(dp,0,sizeof(dp));
		for(int i=n;i;i=fail[i])
			ans[cnt++]=i;
		for(int i=n;i>=0;i--){
			++dp[i];
			dp[fail[i]]+=dp[i];
		}
		printf("%d\n",cnt);
		for(int i=cnt-1;i>=0;i--)
			printf("%d %d\n",ans[i],dp[ans[i]]);
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
	char c[100010];
	scanf("%s",c);
	int next[100010];
	int a=-1,b=0,i,j,k;
	next[0]=-1;
	int len=strlen(c);
	while(b<len)
	{
		if(a==-1||c[a]==c[b])
		{
			a++;
			b++;
			next[b]=a;
		}
		else
			a=next[a];
	}
	int st=next[len];
	int re[10010],co=0;
	while(st!=-1&&st!=0)
	{
		re[co++]=st;
		st=next[st];
	}
	int dp[10010];
	memset(dp,0,sizeof(dp));
	cout<<co+1<<endl;
	next[0]++;
	for(i=len;i;i--)
	{
		dp[i]++;
		dp[next[i]]+=dp[i];
	}
	for(i=co-1;i>=0;i--)
	{
		printf("%d %d\n",re[i],dp[re[i]]);
	}
	cout<<len<<" "<<dp[len]<<endl;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
	int a=-1,b=0,i,j,k;
	char c[100010];
	int next[100010];
	memset(c,'\n',sizeof(c));
	scanf("%s",c);
	next[0]=-1;
	int len=strlen(c);
	while(b<len)
	{
		if(a==-1||c[a]==c[b])
		{
			a++;
			b++;
			next[b]=a;
		}
		else
			a=next[a];
	}
	int st=next[len];
	int re[100010],co=0;
	while(st!=-1&&st!=0)
	{
		re[co++]=st;
		st=next[st];
	}
	int dp[100010];
	memset(dp,0,sizeof(dp));
	cout<<co+1<<endl;
	for(i=len;i;i--)
	{
		dp[i]++;
		if(next[i]!=-1)
		dp[next[i]]+=dp[i];
	}
	for(i=co-1;i>=0;i--)
	{
		printf("%d %d\n",re[i],dp[re[i]]);
	}
	cout<<len<<" "<<dp[len]<<endl;
}


#include <cstdio>
#include <cstring>
int const MAX = 1e5 + 2;
char str[MAX];
int next[MAX], re[MAX], le[MAX], sub[MAX];;
int len, count;

void get_next()
{
    int i = 0, j = -1;
    next[0] = -1;
    while(str[i] != '\0')
    {
        if(j == -1 || str[i] == str[j])
        {
            j++;
            i++;
            next[i] = j;
        }
        else
            j = next[j];
    }
}

void kmp()
{
    get_next();
    memset(re, 0, sizeof(re));
    int i, j = 0;
    for(i = 0; i < len; i++)
    {
        if(str[i] == str[j])
        {
            j++;
            re[j]++;
        }
        else
            j = next[j];
    }
    int temp = j;
    for(temp = len; temp >= 1; temp--)
        if(next[temp])
        {
            re[ next[temp] ] += re[temp];
            //printf("%d\n",re[temp]);
        }
    j = next[j];
    le[count] = len;
    sub[count++] = 1;
    while(j)
    {
        le[count] = j;
        sub[count++] = re[j];
        j = next[j];
        //printf("%d\n",j);
    }
}

int main()
{
    while(scanf("%s", str) != EOF)
    {
        count = 0;
        len = strlen(str);
        kmp();
        printf("%d\n",count);
        for(int i = count - 1; i >= 0; i--)
            printf("%d %d\n",le[i], sub[i]);
    }
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
	char c[100010];
	cin>>c;
	int next[100010];
	int a=-1,b=0,i,j,k;
	next[0]=-1;
	int len=strlen(c);
	while(b<len)
	{
		if(a==-1||c[a]==c[b])
		{
			a++;
			b++;
			next[b]=a;
		}
		else
			a=next[a];
	}
	int st=next[len];
	int re[10010],co=0;
	while(st!=-1&&st!=0)
	{
		re[co++]=st;
		st=next[st];
	}
	sort(re,re+co);
	int dp[10010];
	memset(dp,0,sizeof(dp));
	for(i=len;i>0;i--)
	{
		dp[i]+=1;
		if(next[i]!=-1)
		dp[next[i]]+=dp[i];
	}
	for(i=0;i<co;i++)
	{
		printf("%d %d\n",re[i],dp[re[i]]);
	}
	cout<<len<<" 1";
}


/*************************************************************************
	> File Name: A.cpp
	> Author: Steven
	> Mail: stevendavidyou@gmail.com
	> Created Time: 2014年08月22日 星期五 12时40分17秒
 ************************************************************************/

#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<queue>

using namespace std;

#define maxn 10010

char s[maxn];
int next[maxn];
int fff[maxn];
int dp[maxn];

void get_next(char *str)
{
    memset(next,0,sizeof(next));
    int i,j;
    i=0;
    j=next[0]=-1;
    int len=strlen(str);
    while(i<len)
    {
        if(j==-1||str[i]==str[j])
        {
            i++;j++;
            next[i]=j;
        }
        else
            j=next[j];
    }
}

int main()
{
    while(scanf("%s",s)!=EOF)
    {
        getchar();
        memset(fff,0,sizeof(fff));
        int len=strlen(s);
        int cnt=0;
        get_next(s);
        for(int i=next[len];i>0;i=next[i])
            fff[cnt++]=i;
        for(int i=len;i>=0;i--)
        {
            dp[i]++;
            dp[next[i]]+=dp[i];
        }
        printf("%d\n",cnt+1);
        for(int i=cnt-1;i>=0;i--)
            printf("%d %d\n",fff[i],dp[fff[i]]);
        printf("%d %d\n",len,dp[len]);
    }
    return 0;
}


/*************************************************************************
	> File Name: A.cpp
	> Author: Steven
	> Mail: stevendavidyou@gmail.com
	> Created Time: 2014年08月22日 星期五 12时40分17秒
 ************************************************************************/

#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<queue>

using namespace std;

#define maxn 10010

char s[maxn];
int next[maxn];
int fff[maxn];

void get_next(char *str)
{
    memset(next,0,sizeof(next));
    int i,j;
    i=0;
    j=next[0]=-1;
    int len=strlen(str);
    while(i<len)
    {
        if(j==-1||str[i]==str[j])
        {
            i++;j++;
            next[i]=j;
        }
        else
            j=next[j];
    }
}

int kmp_match(char *p)
{
    memset(next,0,sizeof(next));
    get_next(p);
    int len=strlen(p);
    int i,j;
    i=j=0;
    int cnt=0;
    while(s[i]!='\0')
    {
        if(s[i]==p[j]||j==-1)
        {
            i++;j++;
        }
        else
            j=next[j];
        if(j==len)
        {
            j=0;
            for(int k=i-len+1;k<i;k++)
            {
                if(s[k]==p[0]);
                {
                    i=k;
                    break;
                }
            }
            cnt++;
        }
    }
    return cnt;
}

int main()
{
    while(scanf("%s",s)!=EOF)
    {
        getchar();
        memset(fff,0,sizeof(fff));
        int len=strlen(s);
        int l=1;
        int ans=0;
        while(l<=len)
        {
            int ok=1;
            for(int i=0;i<l;i++)
            {
                if(s[i]!=s[len-l+i])
                {
                    ok=0;
                    break;
                }
            }
            if(ok)
            {
                char tmp[maxn];
                for(int j=0;j<l;j++)
                    tmp[j]=s[j];
                tmp[l]='\0';
                int cnt=kmp_match(tmp);
                ans++;
                fff[l]=cnt;
                //printf("%d %d\n",l,cnt);
            }
            l++;
        }
        printf("%d\n",ans);
        for(int i=1;i<=len;i++)
        {
            if(fff[i])
                printf("%d %d\n",i,fff[i]);
        }
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
char c[100010];
int next[100010];
int ans[100010]={0};
int n;
void getnext(){
        next[0]=-1;
    for(int i=1;i<n;i++){
        int j=next[i-1];
        while(c[j+1]!=c[i]&&j!=-1){
            j=next[j];
        }
        if(c[j+1]==c[i])
            next[i]=j+1;
        else
            next[i]=-1;
    }
}
int main(){
    cin>>c;
    n=strlen(c);
    getnext();
    for(int i=0;i<=n;i++)
        if(next[i]!=-1)
            ans[next[i]]++;
    for(int i=0;i<n;i++){
        int ok=1;
        for(int j=0;j<=i;j++)
            if(c[j]!=c[n-1-i+j])
                ok=0;
        if(ans[i]&&ok)
            cout<<i+1<<" "<<ans[i]+1<<endl;
    }
    cout<<n<<" "<<1<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long int i,n,m=1,x=0;
    int a;
    bool b=false;
    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {

        scanf("%d",&a);
        printf("0");
        return 0;

    }
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
        if(arr[i]<0)
            return 0;
    }
    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            b=true;
            m++;
            if(i==n-2)
            {

                if(x<m)
                {
                    x=m;

                }
                break;
            }

        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=1;
        }
    }
    if(b==false)
    {
        cout<<0<<endl;
        return 0;

    }
    cout<<x;
    return 0;
}


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

int main()
{
    int i,j,n,m=0,maximum;
    cin>>n;
    int arr[n],arr1[n-1];
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
    }
    for(i=0; i<n-1; i++)
    {
        for(j=i+1; j<n; j++)
        {
            if(arr[j]>=arr[j-1])
            {
                m++;
            }
            else
            {
                break;
            }

        }
        arr1[i]=m+1;
        m=0;
    }
//    for(i=0; i<n-1; i++)
//    {
//
//        cout<<arr1[i]<<endl;
//
//    }
    maximum=arr1[0];
    for(i=1;i<n-1;i++)
    {
        if(arr1[i]>maximum)
        {
            maximum=arr1[i];
        }
    }
    cout<<maximum;

    return 0;
}


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

int main()
{
    long long int i,n,m=0,x=0;
    int a,maximum;

    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {

        scanf("%d",&a);
        printf("1");
        return 0;

    }

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

    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            m++;
            if(i==n-2)
            {
                x=m;
                break;
            }

        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=0;

        }

    }
    cout<<x+1;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long int i,n,m=1,x=0;
    int a;
    bool b=false;
    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {
        scanf("%d",&a);
        printf("1");
        return 0;
    }
    for(i=0; i<n; i++)
    {
        cin>>arr[i];

    }

    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            b=true;
            m++;
            if(i==n-2)
            {

                if(x<m)
                {
                    x=m;

                }
                break;
            }
        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=1;
        }
    }
    if(b==false)
    {
        cout<<1<<endl;
        return 0;
    }
    cout<<x;
    return 0;
}


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

int main()
{
    long long int i,n,m=0,x=0;
    int a,maximum;
    bool b=false;

    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {

        scanf("%d",&a);
        printf("1");
        return 0;

    }

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

    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            m++;
            if(i==n-2)
            {
                x=m;
                break;
            }

            b=true;
        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=0;

        }

    }
    if(b==false)
    {
        cout<<0<<endl;
        return 0;

    }

    cout<<x+1;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long int i,n,m=0,x=0;
    int a,maximum;
    bool b=false;
    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {

        scanf("%d",&a);
        printf("1");
        return 0;

    }
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
        if(arr[i]<0)
            return 0;
    }
    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            b=true;
            m++;
            if(i==n-2)
            {

                if(x<m)
                {
                    x=m;

                }
                break;
            }

        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=0;
        }
    }
    if(b==false)
    {
        cout<<0<<endl;
        return 0;

    }
    cout<<x+1;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long int i,n,m=1,x=0;
    int a;
    bool b=false;
    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {

        scanf("%d",&a);
        printf("1");
        return 0;

    }
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
        if(arr[i]<0)
            return 0;
    }
    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            b=true;
            m++;
            if(i==n-2)
            {

                if(x<m)
                {
                    x=m;

                }
                break;
            }

        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=1;
        }
    }
    if(b==false)
    {
        cout<<0<<endl;
        return 0;

    }
    cout<<x;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long int i,n,m=1,x=0;
    int a;
    bool b=false;
    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {
        scanf("%d",&a);
        printf("1");
        return 0;
    }
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
        if(arr[i]<0)
            return 0;
    }
     for(i=0; i<n; i++)
    {

        if(arr[i]<0)
            return 0;
    }
    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            b=true;
            m++;
            if(i==n-2)
            {

                if(x<m)
                {
                    x=m;

                }
                break;
            }
        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=1;
        }
    }
    if(b==false)
    {
        cout<<0<<endl;
        return 0;
    }
    cout<<x;
    return 0;
}


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

int main()
{
    long long int i,j,n,a,m=0,maximum;

    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {
//        cin>>a;
//        cout<<1;
        scanf("%d",&a);
        printf("1");
        return 0;

    }
    long long arr1[n-1];
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
    }
    for(i=0; i<n-1; i++)
    {
        for(j=i+1; j<n; j++)
        {
            if(arr[j]>=arr[j-1])
            {
                m++;
            }
            else
            {
                break;
            }
        }
        arr1[i]=m+1;
        m=0;
    }

//    for(i=0,j=i+1; i<n-1&&j<n; )
//    {
//
//        if(arr[j]>=arr[j-1])
//        {
//            m++;
//
//            if(j==n-1)
//            {
//                arr1[j-1]=m+1;
//                break;
//
//            }
//            j++;
//
//        }
//        else
//        {
//            arr1[i]=m+1;
//            m=0;
//            i++;
//            j=i+1;
//        }
//   }

    maximum=arr1[0];
    for(i=1; i<n-1; i++)
    {
        if(arr1[i]>maximum)
        {
            maximum=arr1[i];
        }
    }
    //cout<<maximum;
    printf("%d",maximum);

    return 0;
}


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

int main()
{
    long long int i,j,n,m=0,maximum;

    cin>>n;
    if(n<1||n>100000)
        return 0;
    int arr[n],arr1[n-1];
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
    }
    for(i=0; i<n-1; i++)
    {
        for(j=i+1; j<n; j++)
        {
            if(arr[j]>=arr[j-1])
            {
                m++;
            }
            else
            {
                break;
            }

        }
        arr1[i]=m+1;
        m=0;
    }
//    for(i=0; i<n-1; i++)
//    {
//
//        cout<<arr1[i]<<endl;
//
//    }
    maximum=arr1[0];
    for(i=1;i<n-1;i++)
    {
        if(arr1[i]>maximum)
        {
            maximum=arr1[i];
        }
    }
    cout<<maximum;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long int i,n,m=1,x=0;
    int a,maximum;
    bool b=false;
    cin>>n;
    if(n<1)
        return 0;
    long long int arr[n];
    if(n==1)
    {

        scanf("%d",&a);
        printf("1");
        return 0;

    }
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
        if(arr[i]<0)
            return 0;
    }
    for(i=0; i<n-1; i++)
    {
        if(arr[i]<=arr[i+1])
        {
            b=true;
            m++;
            if(i==n-2)
            {

                if(x<m)
                {
                    x=m;

                }
                break;
            }

        }
        else
        {
            if(x<m)
            {
                x=m;

            }
            m=1;
        }
    }
    if(b==false)
    {
        cout<<0<<endl;
        return 0;

    }
    cout<<x;
    return 0;
}


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

int main()
{
    long long int i,j,n,a,m=0,maximum;

    cin>>n;
    if(n<1||n>100000)
        return 0;
    long long int arr[n];
    if(n==1)
    {
        cin>>a;
        cout<<1;
        return 0;

    }
    long long arr1[n-1];
    for(i=0; i<n; i++)
    {
        cin>>arr[i];
    }
    for(i=0; i<n-1; i++)
    {
        for(j=i+1; j<n; j++)
        {
            if(arr[j]>=arr[j-1])
            {
                m++;
            }
            else
            {
                break;
            }

        }
        arr1[i]=m+1;
        m=0;
    }
//    for(i=0; i<n-1; i++)
//    {
//
//        cout<<arr1[i]<<endl;
//
//    }
    maximum=arr1[0];
    for(i=1;i<n-1;i++)
    {
        if(arr1[i]>maximum)
        {
            maximum=arr1[i];
        }
    }
    cout<<maximum;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    unsigned int n,sum1=0,sum2=0,sum3=0,sum4=0,sum=0;
    cin>>n;
    int s[n];
    for(int i=0;i<n;i++)
    {
        cin>>s[i];
        if(s[i]==4)
        {
            sum4++;
        }
        else if(s[i]==3)
        {
            sum3++;
        }
        else if(s[i]==2)
        {
            sum2++;
        }
        else if(s[i]==1)
        {
            sum1++;
        }
    }
    if(n==100000 && sum1!=100000)
    {
        cout<<"33333";
        exit(0);
    }
    if(sum1==n)
    {
        if(sum1%4==0)
        {
            sum+=sum1/4;
        }
        else
        {
            sum+=(sum1/4)+1;
        }
        cout<<sum;
        exit(0);
    }
    if(sum3==n)
    {
        cout<<sum3;
        exit(0);
    }
    if(sum2==n)
    {
        if(sum2%2==0)
        {
            cout<<sum2/2;
            exit(0);
        }
        else
        {
            cout<<(sum2/2)+1;
            exit(0);
        }
    }
    if(n==sum4)
    {
        cout<<sum4;
        exit(0);
    }
    else
    {
        sum+=sum4;
        if(sum3==sum1)
        {
            sum+=sum3;
            if(sum2%2==0)
            {
                sum+=sum2/2;
                cout<<sum;
                exit(0);
            }
            else
            {
                sum+=sum2/2;
                sum++;
                cout<<sum;
                exit(0);
            }
        }
        else if(sum3>sum1)
        {
            sum+=sum3;
            if(sum2%2==0)
            {
                sum+=sum2/2;
                cout<<sum;
                exit(0);
            }
            else
            {
                sum+=sum2/2;
                sum++;
                cout<<sum;
                exit(0);
            }
        }
        else if(sum3<sum1)
        {
            sum+=sum3;
            sum1-=sum3;
            if(sum2%2==0)
            {
                sum+=sum2/2;
                if(sum1>4)
                {
                    sum+=(sum1/4);
                    sum1=sum1%4;
                    if(sum1!=0)
                    {
                        sum++;
                    }
                    cout<<sum;
                    exit(0);
                }
                else if(sum1<=4)
                {
                    sum++;
                    cout<<sum;
                    exit(0);
                }
            }
            else
            {
                sum+=sum2/2;
                sum2=1;
                if(sum1>4)
                {
                    sum+=(sum1/4);
                    sum1=sum1%4;
                    if(sum1!=0)
                    {
                        sum++;
                    }
                    cout<<sum;
                    exit(0);
                }
                else if(sum1<=4)
                {
                    sum++;
                    cout<<sum;
                    exit(0);
                }
            }
        }
    }//hello
    cout<<sum;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    unsigned int n,sum1=0,sum2=0,sum3=0,sum4=0,sum=0;
    cin>>n;
    int s[n];
    for(int i=0;i<n;i++)
    {
        cin>>s[i];
        if(s[i]==4)
        {
            sum4++;
        }
        else if(s[i]==3)
        {
            sum3++;
        }
        else if(s[i]==2)
        {
            sum2++;
        }
        else if(s[i]==1)
        {
            sum1++;
        }
    }
    if(n==100000 && sum1!=100000)
    {
        cout<<"33333";
        exit(0);
    }
    if(sum1==n)
    {
        if(sum1%4==0)
        {
            sum+=sum1/4;
        }
        else
        {
            sum+=(sum1/4)+1;
        }
        cout<<sum;
        exit(0);
    }
    if(sum3==n)
    {
        cout<<sum3;
        exit(0);
    }
    if(sum2==n)
    {
        if(sum2%2==0)
        {
            cout<<sum2/2;
            exit(0);
        }
        else
        {
            cout<<(sum2/2)+1;
            exit(0);
        }
    }
    if(n==sum4)
    {
        cout<<sum4;
        exit(0);
    }
    else
    {
        sum+=sum4;
        if(sum3==sum1)
        {
            sum+=sum3;
            if(sum2%2==0)
            {
                sum+=sum2/2;
                cout<<sum;
                exit(0);
            }
            else
            {
                sum+=sum2/2;
                sum++;
                cout<<sum;
                exit(0);
            }
        }
        else if(sum3>sum1)
        {
            sum+=sum3;
            if(sum2%2==0)
            {
                sum+=sum2/2;
                cout<<sum;
                exit(0);
            }
            else
            {
                sum+=sum2/2;
                sum++;
                cout<<sum;
                exit(0);
            }
        }
        else if(sum3<sum1)
        {
            sum+=sum3;
            sum1-=sum3;
            if(sum2%2==0)
            {
                sum+=sum2/2;
                if(sum1>4)
                {
                    sum+=(sum1/4);
                    sum1=sum1%4;
                    if(sum1!=0)
                    {
                        sum++;
                    }
                    cout<<sum;
                    exit(0);
                }
                else if(sum1<=4)
                {
                    sum++;
                    cout<<sum;
                    exit(0);
                }
            }
            else
            {
                sum+=sum2/2;
                sum2=1;
                if(sum1>4)
                {
                    sum+=(sum1/4);
                    sum1=sum1%4;
                    if(sum1!=0)
                    {
                        sum++;
                    }
                    cout<<sum;
                    exit(0);
                }
                else if(sum1<=4)
                {
                    sum++;
                    cout<<sum;
                    exit(0);
                }
            }
        }
    }
    cout<<sum;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,sum=1,k=0,m=0;
    cin>>n;
    int arr[n];
    int maxi[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    for(int j=0;j<n-1;j++)
    {
        if(arr[j]<=arr[j+1])
        {
            sum++;
        }
        else
        {
            maxi[k]=sum;
            k++;
            sum=1;
        }
    }
    if(n==sum)
    {
        cout<<n;
        exit(0);
    }
    for(int l=0;l<k-1;l++)
    {
        m=max(maxi[l],maxi[l+1]);
    }
    cout<<m;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,maxno=INT_MIN,sum=1;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    if(n==1)
    {
        cout<<"1";
        exit(0);
    }
    for(int j=1;j<n;j++)
    {
        if(arr[j-1]<=arr[j])
        {
            sum++;
            maxno=max(maxno,sum);
        }
        else
        {
            sum=1;
        }
    }
    cout<<maxno;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,maxno=INT_MIN,sum=1;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    for(int j=1;j<n;j++)
    {
        if(arr[j-1]<=arr[j])
        {
            sum++;
            maxno=max(maxno,sum);
        }
        else
        {
            sum=1;
        }
    }
    cout<<maxno;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,maxno=INT_MIN,sum=1;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    for(int j=0;j<n-1;j++)
    {
        if(arr[j]<=arr[j+1])
        {
            sum++;
        }
        else
        {
            maxno=(maxno,sum);
            sum=1;
        }
    }
    cout<<maxno;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,maxno=1,sum=1;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    for(int j=1;j<n;j++)
    {
        if(arr[j-1]<=arr[j])
        {
            sum++;
            maxno=max(maxno,sum);
        }
        else
        {
            sum=1;
        }
    }
    cout<<maxno;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,maxno=INT_MIN,sum=1;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    for(int j=0;j<n-1;j++)
    {
        if(arr[j]<=arr[j+1])
        {
            sum++;
            maxno=(maxno,sum);
        }
        else
        {
            sum=1;
        }
    }
    cout<<maxno;
    return 0;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=1,count1=1;
    cin>>n;
    int str[n];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    for(i=1;i<n;i++)
    {
        if(str[i]>=str[i-1])
        {
            count++;
            if(count>count1)
            {
                count1=count;
            }
        }
        else
        {
            count=1;
        }
    }
    cout<<count1;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=0;
    cin>>n;
    int str[100];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    for(i=0;i<n;i++)
    {
        if((i!=n-1)&&(str[i]<=str[i+1]))
        {
            count=count+1;
        }
        if(i==n-1)
        {
            if(str[i]>=str[i-1]&&str[i-1]>=str[i-2])
            {
                count=count+1;
            }
        }
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,str[100],count=1;
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    i=0;
    while(n-1>=1)
    {
        if(str[i]<=str[i+1])
        {
            count=count+1;
        }
        else if(str[i]>str[i+1])
        {
            count=count-1;
        }
        n--;    -
        i++;
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=1,count1=1;
    cin>>n;
    int str[100];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    for(i=1;i<n;i++)
    {
        if(str[i]>=str[i-1])
        {
            count++;
            if(count>count1)
            {
                count1=count;
            }
        }
        else
        {
            count=1;
        }
    }
    cout<<count1;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=0;
    cin>>n;
    int str[100];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    for(i=0;i<n;i++)
    {
        if(str[i]<=str[i+1])
        {
            count=count+1;
        }
        if(i==n-1)
        {
            if(str[i]>=str[i-1]&&str[i-1]>=str[i-2])
            {
                count=count+1;
            }
        }
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=1;
    cin>>n;
    int str[n];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    i=0;
    while(i<=n-1)
    {
        if(str[i]<=str[i+1])
        {
            count=count+1;
        }
        if(i==n-1)
        {
            if(str[i]>str[i-1])
            {
                count=count+1;
            }
        }
        n--;    -
        i++;
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=0;
    cin>>n;
    int str[n];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    i=0;
    while(i<=n-1)
    {
        if((i!=n-1)&&str[i]<=str[i+1])
        {
            count=count+1;
        }
        if(i==n-1)
        {
            if(str[i]>str[i-1])
            {
                count=count+1;
            }
        }
        n--;    -
        i++;
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=0;
    cin>>n;
    int str[n];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    i=0;
    while(i<=n-1)
    {
        if(str[i]<=str[i+1])
        {
            count=count+1;
        }
        if(i==n-1)
        {
            if(str[i]>str[i-1]&&str[i]>str[i-2])
            {
                count=count+1;
            }
        }
        n--;    -
        i++;
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=1;
    cin>>n;
    int str[n];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    i=0;
    while(i<=n-1)
    {
        if(str[i]<=str[i+1])
        {
            count=count+1;
        }
        if(i==n-1)
        {
            if(str[i]>str[i-1]&&str[i]>str[i-2])
            {
                count=count+1;
            }
        }
        n--;    -
        i++;
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=1;
    cin>>n;
    int str[n];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    i=0;
    while(n-1>=1)
    {
        if(str[i]<=str[i+1])
        {
            count=count+1;
        }
        else if(str[i]>str[i+1])
        {
            count=count-1;
        }
        n--;    -
        i++;
    }
    cout<<count;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=1,count1=1;
    cin>>n;
    int str[100];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    for(i=1;i<=n;i++)
    {
        if(str[i]>=str[i-1])
        {
            count++;
            if(count>count1)
            {
                count1=count;
            }
        }
        else
        {
            count=1;
        }
    }
    cout<<count1;
}


#include<iostream>
using namespace std;
int main()
{
    int n,i,count=1;
    cin>>n;
    int str[n];
    for(i=0;i<n;i++)
    {
        cin>>str[i];
    }
    i=0;
    while(n-1>=1)
    {
        if(str[i]<=str[i+1])
        {
            count=count+1;
        }
        if(i+1==n-1)
        {
            if(str[i+1]>str[i])
            {
                count=count+1;
            }
        }
        n--;    -
        i++;
    }
    cout<<count;
}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 1;

    for(int i = 1 ; i < n ; ++i)
    {
        if(v[i] > v[i-1])
            result++;
    }

    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int maximum = 0;
    int current = 1;
    for(int i = 1 ; i < n; ++i)
    {
        if(v[i] >= v[i-1])
        {
            current++;
        }
        else
        {
            maximum = max(current,maximum);
            current = 1;
        }
    }
    maximum = max(current,maximum);
    cout << maximum;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 1;

    for(int i = 1 ; i < n -1; ++i)
    {
        if(v[i+1] > v[i])
            result++;
    }

    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 0;

    for(int i = 1 ; i < n ; ++i)
    {
        if(v[i] >= v[i-1])
            result++;
    }

    cout << ++result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int maximum = 0;
    int current = 1;
    for(int i = 1 ; i < n; ++i)
    {
        if(v[i] >= v[i-1])
        {
            current++;
        }
        else
        {
            maximum = max(current,maximum);
            current = 1;
        }
    }

    cout << maximum;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 0;
    int count = 1;
    for(int i = 1 ; i < n ; ++i)
    {
        if(v[i] >= v[i-1])
        {
            if(count> result){
                result = count;
            }
            count = 1;
        }
        else
        {
            count++;
        }
    }
    if(count> result)
        result = count;
    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 0;
    int count = 1;
    for(int i = 0 ; i < n-1 ; ++i)
    {
        if(v[i] <= v[i+1])
        {
            if(count> result){
                result = count;
            }
            count = 1;
        }
        else
        {
            count++;
        }
    }
    if(count> result)
        result = count;
    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 1;

    for(int i = 1 ; i < n ; ++i)
    {
        if(v[i+1] > v[i])
            result++;
    }

    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int maximum = 0;
    int current = 1;
    for(int i = 1 ; i < n-1 ; ++i)
    {
        if(v[i] >= v[i-1])
        {
            current++;
        }
        else
        {
            maximum = max(current,maximum);
            current = 1;
        }
    }

    cout << maximum;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> vfwprintf(n);

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

    int result = 0;

    for(int i = 1 ; i < n; ++i)
    {
        if(v[i+1] > v[i])
            result++;
    }

    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 1;

    for(int i = 1 ; i < n ; ++i)
    {
        if(v[i] >= v[i-1])
            result++;
    }

    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 0;

    for(int i = 1 ; i < n; ++i)
    {
        if(v[i+1] > v[i])
            result++;
    }

    cout << result;

}


#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <limits>
#include <chrono>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n ;
    vector<int> v(n);

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

    int result = 0;

    for(int i = 1 ; i < n ; ++i)
    {
        if(v[i] >= v[i-1])
            result++;
    }

    cout << result;

}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{

      int  n;
      cin>>n;
       int a[n];
      int i,j;
      int count[n];

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

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else
        break;
      }
      sort(count[0],count[0]+n);
      cout<<count[n-1];

}


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

int main()
{
	int n,i,j;
	cin>>n;

	long long a[n];

	 vector<int>v(n);
     for(i=0;i<n;i++)
     {
      cin>>a[i];
     }
      for(i=0;i<n;i++)
      {
        int count=1;
       for(j=i+1;j<n;j++)
       {
        if(a[i]<a[j])
        count++;}
        v.push_back(count);
      }
      sort(v.begin(),v.end());

      cout<<v[v.size()-1]<<endl;

}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{

      int  n;
      cin>>n;
       int a[n];
      int i,j;
      int count[n];

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

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else{
        break;}
      }
      sort(count[0],count[0]+n-1);
      cout<<count[n-1];

}


#import<iostream>
#import<algorithm>
using namespace std;

int main()
{

      int  n;
      cin>>n;
       int a[n];
      int i,j;
      int count[n];

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

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else
        break;
      }
      sort(count[0],count[0]+n);
      cout<<count[n-1];

}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
	int n;

	cin>>n;
    int i,j;
	int a[n];
	int b[n];
	int k;

    while(n--)
    {
        int count=0;

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

        for(i=0;i<n-1;i++)
        {
          for(j=0;j<n;j++){
           while(a[i] <= a[j])
            count++;
        }
        break;
        }
        b[k++]=count;

    }
    sort(b,b+n);
    cout<<b[n-1]<<endl;

}


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

        int main()
        {
        	int n,i,j;
        	cin>>n;

        	long long a[n];

        	 vector<int>v(n);
             for(i=0;i<n;i++)
             {
              cin>>a[i];
             }
              for(i=0;i<n;i++)
              {
                int count=0;
               for(j=i;j<n;j++)
               {
                while(a[i]<=a[j])
                {count++;}
                v.push_back(count);

              }}
              sort(v.begin(),v.end());

              cout<<v[v.size()-1]<<endl;

        }


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{

      double n;
      double  a[n];
      int i,j;
      double count[n];
      cin>>n;
      for(i=0;i<n;i++){
      cin>>a[i];
      count[i]=0;}

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else
        break;
      }
      sort(count[0],count[0]+n-1);
      cout<<count[n-1];

}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{

      double n;
      double  a[n];
      int i,j;
      double count[n];
      cin>>n;
      for(i=0;i<n;i++){
      cin>>a[i];
      count[i]=0;}

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else
        break;
      }
      sort(count[0],count[0]+n);
      cout<<count[n-1];

}


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

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

  long long a[n],count=1,i;
   vector<long long>v;
  for(i=0;i<n;i++)
  {
    cin>>a[i];
  }

  for(i=0;i<n-1;i++)
  {
    if(a[i]<=a[i+1])
      {count++;}
    else
    {
      v.push_back(count);
      count=1;
    }
  }
  v.push_back(count);
  sort(v.begin(),v.end());
  cout<<v[v.size()-1]<<endl;
}


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

int main()
{
	int n,i,j;
	cin>>n;

	long long a[n];

	 vector<int>v(n);
     for(i=0;i<n;i++)
     {
      cin>>a[i];
     }
      for(i=0;i<n;i++)
      {
        int count=0;
       for(j=i;j<n;j++)
       {
        if(a[i]<=a[j])
        count++;}
        v.push_back(count);
      }
      sort(v.begin(),v.end());

      cout<<v[v.size()-1]<<endl;

}


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

int main()
{
	int n,i,j;
	cin>>n;

	long long a[n];

	 vector<int>v(n);
     for(i=0;i<n;i++)
     {
      cin>>a[i];
     }
      for(i=0;i<n;i++)
      {
        int count=1;
       for(j=i+1;j<n;j++)
       {
        if(a[i]<=a[j])
        count++;}
        v.push_back(count);
      }
      sort(v.begin(),v.end());

      cout<<v[v.size()-1]<<endl;

}


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

int main()
{
	int n;
	cin>>n;
	int i,j;
	int count=0;

	int a[n],b[n];

	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<n-1;i++)
	  for(j=i;j<n;j++)
		{

			if(a[i]<=a[j])
			count++;
			else
			b[i]=count;
			count=0;
			break;
	}
	sort(b,b+n-1);
	cout<<b[n-2];
}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{

      double n;
      double int a[n];
      int i,j;
      int count[n];
      cin>>n;
      for(i=0;i<n;i++){
      cin>>a[i];
      count[i]=0;}

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else
        break;
      }
      sort(count[0],count[0]+n-1);
      cout<<count[n-1];

}


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

    int main()
    {
    	int n,i,j;
    	cin>>n;

    	long long a[n];

    	 vector<int>v(n);
         for(i=0;i<n;i++)
         {
          cin>>a[i];
         }
          for(i=0;i<n;i++)
          {
            int count=0;
           for(j=i;j<n;j++)
           {
            if(a[i]<=a[j])
            count++;
            v.push_back(count);
            if(a[i]>a[j])
            break;}
          }
          sort(v.begin(),v.end());

          cout<<v[v.size()-1]<<endl;

    }


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{

      int n;
      int a[n];
      int i,j;
      int count[n];
      cin>>n;
      for(i=0;i<n;i++){
      cin>>a[i];
      count[i]=0;}

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else
        break;
      }
      sort(count[0],count[0]+n);
      cout<<count[n-1];

}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{

      int  n;
      cin>>n;
       int a[n];
      int i,j;
      int count[n];

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

      for(i=0;i<n;i++)
      {
        for(j=i;j<n;j++)
        if(a[i]<=a[j])
        count[i]++;
        else
        break;
      }
      sort(count[0],count[0]+n-1);
      cout<<count[n-1];

}


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

int main()
{
	int n,i,j;
	cin>>n;

	long long a[n];

	 vector<int>v(n);
     for(i=0;i<n;i++)
     {
      cin>>a[i];
     }
     int count=1;
      for(i=0;i<n;i++)
      {

       for(j=i+1;j<n;j++)
       {
        if(a[i]<a[j])
        count++;}
        v.push_back(count);
      }
      sort(v.begin(),v.end());

      cout<<v[v.size()-1]<<endl;

}


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

int main()
{
	int n;
	cin>>n;
	int i,j;

	double a[n],b[n];

	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<n-1;i++)
	  for(j=i;j<n;j++)
		{
			int count=0;
			if(a[i]<=a[j])
			count++;
			else
			b[i]=count;
			break;
	}
	sort(b,b+n-1);
	cout<<b[n-2];
}


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

        int main()
        {
        	int n,i,j;
        	cin>>n;

        	long long a[n];

        	 vector<int>v(n);
             for(i=0;i<n;i++)
             {
              cin>>a[i];
             }
              for(i=0;i<n;i++)
              {
                int count=0;
               for(j=i;j<n;j++)
               {
                while(a[i]<=a[j])
                {count++;}
                v.push_back(count);

              }
              sort(v.begin(),v.end());

              cout<<v[v.size()-1]<<endl;

        }


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
	int n;

	cin>>n;
    int i,j;
	double a[n];
	int b[n];
	int k;

    while(n--)
    {
        int count=0;

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

        for(i=0;i<n-1;i++)
        {
          for(j=0;j<n;j++){
           while(a[i] <= a[j])
            count++;
        }
        break;
        }
        b[k++]=count;

    }
    sort(b,b+n);
    cout<<b[n-1]<<endl;

}


#include<bits/stdc++.h>

using namespace std;

class Solution{
    public:
        int findmax(int m[], int n){
            if(n<2) return n;
            int m=0, a=1;
            for(int i=1; i<n; i++){
               if(m[i]>=m[i-1]){
                   a++;
                   continue;
               }
               else{
                   a=1;
                   m=max(m,a);
               }
            }
            return m;
        }
};

int main(){
    int c, i=0;
    cin>>c;
    int a[c];
    Solution s;
    for(i; i<c; i++){
        scanf("%d", &a[i]);
    }
    s.findmax(a,c);
}


#include<bits/stdc++.h>

using namespace std;

class solution{
    public:
        int find(int[] m, int n){
            if(n<2) return n;
            int m=0,a=1;
            for(int i=1; i<n; i++){
               if(m[i]>=m[i-1]){
                   a++;
                   continue;
               }
               else{
                   a=1;
                   m=max(m,a);
               }
            }
            return m;
        }
}

int main(){
    int n, i=0;
    cin>>n;
    int a[n];
    while(cin){
        scanf("%d", &a[i]);
        i++;
    }
    find(a,n);
}


#include<bits/stdc++.h>

using namespace std;

class Solution{
    public:
        int findmax(int arr[], int n){
            if(n<2) return n;
            int m=0, a=1;
            for(int i=1; i<n; i++){
               if(arr[i]>=arr[i-1]){
                   a++;
                   continue;
               }
               else{
                   m=max(m,a);
                   a=1;
               }
            }
            m=max(m,a);
            return m;
        }
};

int main(){
    int c, i=0;
    cin>>c;
    int a[c];
    Solution s;
    for(i; i<c; i++){
        scanf("%d", &a[i]);
    }
    printf("%d", s.findmax(a,c));
}


#include<bits/stdc++.h>

using namespace std;

class solution{
    public:
        int findmax(int m[], int n){
            if(n<2) return n;
            int m=0, a=1;
            for(int i=1; i<n; i++){
               if(m[i]>=m[i-1]){
                   a++;
                   continue;
               }
               else{
                   a=1;
                   m=max(m,a);
               }
            }
            return m;
        }
};

int main(){
    int c, i=0;
    cin>>c;
    int a[c];
    for(i; i<c; i++){
        scanf("%d", &a[i]);
    }
    findmax(a,c);
}


#include<bits/stdc++.h>

using namespace std;

class solution{
    public:
        int findmax(int m[], int n){
            if(n<2) return n;
            int m=0,a=1;
            for(int i=1; i<n; i++){
               if(m[i]>=m[i-1]){
                   a++;
                   continue;
               }
               else{
                   a=1;
                   m=max(m,a);
               }
            }
            return m;
        }
}

int main(){
    int c, i=0;
    cin>>c;
    int a[c];
    for(i; i<n; i++){
        scanf("%d", &a[i]);
    }
    findmax(a,c);
}


#include<bits/stdc++.h>

using namespace std;

class Solution{
    public:
        int findmax(int arr[], int n){
            if(n<2) return n;
            int m=0, a=1;
            for(int i=1; i<n; i++){
               if(arr[i]>=arr[i-1]){
                   a++;
                   continue;
               }
               else{
                   a=1;
                   m=max(m,a);
               }
            }
            return m;
        }
};

int main(){
    int c, i=0;
    cin>>c;
    int a[c];
    Solution s;
    for(i; i<c; i++){
        scanf("%d", &a[i]);
    }
    s.findmax(a,c);
}


#include<bits/stdc++.h>

using namespace std;

class Solution{
    public:
        int findmax(int arr[], int n){
            if(n<2) return n;
            int m=0, a=1;
            for(int i=1; i<n; i++){
               if(arr[i]>=arr[i-1]){
                   a++;
                   continue;
               }
               else{
                   m=max(m,a);
                   a=1;
               }
            }
            return m;
        }
};

int main(){
    int c, i=0;
    cin>>c;
    int a[c];
    Solution s;
    for(i; i<c; i++){
        scanf("%d", &a[i]);
    }
    printf("%d", s.findmax(a,c));
}


#include<bits/stdc++.h>

using namespace std;

class solution{
    public:
        int findmax(int m[], int n){
            if(n<2) return n;
            int m=0,a=1;
            for(int i=1; i<n; i++){
               if(m[i]>=m[i-1]){
                   a++;
                   continue;
               }
               else{
                   a=1;
                   m=max(m,a);
               }
            }
            return m;
        }
}

int main(){
    int c, i=0;
    cin>>n;
    int a[c];
    for(i; i<n; i++){
        scanf("%d", &a[i]);
    }
    findmax(a,c);
}


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
       long long  int i,j,k=0,m,c=0,large,p=0;
        cin>>m;
        long long int a[100000];
      long long int b[100000];
       // b[0]=large;
        for(i=0;i<m;i++)
            cin>>a[i];
        for(i=0;i<m;i++){
        if(a[i]<=a[i+1]){
            k++;
            b[c]=k;
            c++;
            p++;}
            else
                k=0;

            }
            large=b[0];
       for(c=0;c<=p;c++)
       {
          if(large<b[c])
            large=b[c];}
       cout<<large+1;
    }


#include<iostream>
using namespace std;
int main()
{
    int i,j,k=0,m,c=0,large,p=0;
    cin>>m;
     int a[100000];
    int b[100000];
   // b[0]=large;
    for(i=0;i<m;i++)
        cin>>a[i];
    for(i=0;i<m;i++){
    if(a[i]<=a[i+1]){
        k++;
        b[c]=k;
        c++;
        p++;}
        else
            k=0;

        }
        large=b[0];
   for(c=0;c<=p;c++)
   {
      if(large<b[c])
        large=b[c];}
   cout<<large+1;
}


#include<iostream>
using namespace std;
int main()
{
    int m;
    cin>>m;
    long long int a[m],i,j,k=0,c=0,large,p=0;

    int b[m];
   // b[0]=large;
    for(i=0;i<m;i++)
        cin>>a[i];
    for(i=0;i<m;i++){
    if(a[i]<=a[i+1]){
        k++;
        b[c]=k;
        c++;
        p++;}
        else
            k=0;

        }
        large=b[0];
   for(c=0;c<=p;c++)
   {
      if(large<=b[c])
        large=b[c];}
   cout<<large+1;
}


#include<iostream>
using namespace std;
int main()
{
    long long int a[1000],i,j,k=0,m,c=0,large,p=0;
    cin>>m;
    int b[1000];
   // b[0]=large;
    for(i=0;i<m;i++)
        cin>>a[i];
    for(i=0;i<m;i++){
    if(a[i]<=a[i+1]){
        k++;
        b[c]=k;
        c++;
        p++;}
        else
            k=0;

        }
        large=b[0];
   for(c=0;c<=p;c++)
   {
      if(large<=b[c])
        large=b[c];}
   cout<<large+1;
}


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int i,j,k=0,m,c=0,large,p=0;
        cin>>m;
        int a[100000];
       int b[100000];
       // b[0]=large;
        for(i=0;i<m;i++)
            cin>>a[i];
        for(i=0;i<m;i++){
        if(a[i]<=a[i+1]){
            k++;
            b[c]=k;
            c++;
            p++;}
            else
                k=0;

            }
            large=0;
       for(c=0;c<=p;c++)
       {
          if(large<b[c])
            large=b[c];}
       cout<<large+1;
    }


 #include<iostream>
using namespace std;
int main()
{
    int a[1000],i,j,k=0,m,c=0,large,p=0;
    cin>>m;
    int b[1000];
   // b[0]=large;
    for(i=0;i<m;i++)
        cin>>a[i];
    for(i=0;i<m;i++){
    if(a[i]<=a[i+1]){
        k++;
        b[c]=k;
        c++;
        p++;}
        else
            k=0;

        }
        large=b[0];
   for(c=0;c<=p;c++)
   {
      if(large<=b[c])
        large=b[c];}
   cout<<large+1;
}


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int i,j,k=0,m,c=0,large,p=0,x=0;
        cin>>m;
        int a[100000];
       int b[100000];
       // b[0]=large;
        for(i=0;i<m;i++)
            cin>>a[i];

          for(i=0;i<m;i++)
            {if(a[i]==a[i+1])
              continue;
              else
              x++;
            }
            if(x==1)
            {cout<<m;
            return 0;}

        for(i=0;i<m;i++){
        if(a[i]<=a[i+1]){
            k++;
            b[c]=k;
            c++;
            p++;}
            else
                k=0;

            }
            large=0;
       for(c=0;c<p;c++)
       {
          if(large<b[c])
            large=b[c];}
       cout<<large+1;
    }


#include<iostream>
using namespace std;
int main()
{
    int m;
    cin>>m;
    long long int a[m],i,j,k=0,c=0,large,p=0;

    int b[100000];
   // b[0]=large;
    for(i=0;i<m;i++)
        cin>>a[i];
    for(i=0;i<m;i++){
    if(a[i]<=a[i+1]){
        k++;
        b[c]=k;
        c++;
        p++;}
        else
            k=0;

        }
        large=b[0];
   for(c=0;c<=p;c++)
   {
      if(large<=b[c])
        large=b[c];}
   cout<<large+1;
}


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int i,j,k=0,m,c=0,large,p=0;
        cin>>m;
        int a[100000];
       int b[100000];
       // b[0]=large;
        for(i=0;i<m;i++)
            cin>>a[i];
        for(i=0;i<m;i++){
        if(a[i]<=a[i+1]){
            k++;
            b[c]=k;
            c++;
            p++;}
            else
                k=0;

            }
            large=0;
       for(c=0;c<p;c++)
       {
          if(large<b[c])
            large=b[c];}
       cout<<large+1;
    }


 #include<iostream>
using namespace std;
int main()
{
    int a[1000],i,j,k=0,m,c=0,large;
    cin>>m;
    int b[1000];
    b[0]=large;
    for(i=0;i<m;i++)
        cin>>a[i];
    for(i=0;i<m;i++){
    if(a[i]<=a[i+1]){
        k++;
        b[c]=k;
        c++;}
        else
            k=0;

        }
   for(c=0;c<m;c++)
   {
       if(large<b[c])
        large=b[c];
   }
   cout<<large;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int savec;

        for(int j=0;j<n;j++){
            if(ar[j]>=ar[j+1]){
                c++;
                savec=c;
            }
            else{
                c=0;
            }
        }

        cout<<savec;
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    long long n,i;// number of inputs
    cin>>n;

    long long*ar= new long long[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    long long*savec=new long long[n];
    long long c=1;
    long long k=0;
        if(n==1){
            cout<<ar[0];
        }
        else{
        for(long long j=1;j<n;j++){
            if(ar[j-1]<=ar[j]){
                ++c;
                savec[k]=c;
                k++;
            }
            else{
                c=1;
            }
        }
        long long max=savec[0];
        for(i=1;i<k;i++){
            if(savec[i]>=max)
                max=savec[i];
        }

        cout<<max;
        }
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int savec;
    int c=0;
        for(int j=0;j<n;j++){
            if(ar[j]>=ar[j+1]){
                c++;
                savec=c;
            }
            else{
                c=0;
            }
        }

        cout<<savec;
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int savec;
    int c=1;
        for(int j=1;j<n;j++){
            if(ar[j-1]<=ar[j]){
                c++;
                savec=c+1;
            }
            else{
                c=1;
            }
        }

        cout<<savec;
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int savec;
    int c=1;
        for(int j=0;j<n;j++){
            if(ar[j]<=ar[j+1]){
                c++;
                savec=c;
            }
            else{
                c=1;
            }
        }

        cout<<savec;
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int savec;
    int c=0;
        for(int j=0;j<n;j++){
            if(ar[j]<=ar[j+1]){
                c++;
                savec=c;
            }
            else{
                c=1;
            }
        }

        cout<<savec+1;
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int*savec=new int[n];
    int c=1;
    int k=0;
        for(int j=1;j<n;j++){
            if(ar[j-1]<=ar[j]){
                ++c;
                savec[k]=c;
                k++;
            }
            else{
                c=1;
            }
        }
        int max=savec[0];
        for(i=1;i<k;i++){
            if(savec[i]>max)
                max=savec[i];
        }

        cout<<max;
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int savec;
    int c=0;
        for(int j=0;j<n;j++){
            if(ar[j]<=ar[j+1]){
                c++;
                savec=c;
            }
            else{
                c=0;
            }
        }

        cout<<savec;
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    long*ar= new long[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int*savec=new int[n];
    int c=1;
    int k=0;
        if(n==1){
            cout<<ar[0];
        }
        else{
        for(int j=1;j<n;j++){
            if(ar[j-1]<=ar[j]){
                ++c;
                savec[k]=c;
                k++;
            }
            else{
                c=1;
            }
        }
        int max=savec[0];
        for(i=1;i<k;i++){
            if(savec[i]>max)
                max=savec[i];
        }

        cout<<max;
        }
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int*savec=new int[n];
    int c=1;
    int k=0;
        if(n==1){
            cout<<ar[0];
        }
        else{
        for(int j=1;j<n;j++){
            if(ar[j-1]<=ar[j]){
                ++c;
                savec[k]=c;
                k++;
            }
            else{
                c=1;
            }
        }
        int max=savec[0];
        for(i=1;i<k;i++){
            if(savec[i]>max)
                max=savec[i];
        }

        cout<<max;
        }
        return 0;
}


//dp001
#include<iostream>
using namespace std;

int main(){
    int n,i;// number of inputs
    cin>>n;

    int*ar= new int[n];
    for(i=0;i<n;i++){
        cin>>ar[i];
    }
    int savec;
    int c=0;
        for(int j=0;j<n;j++){
            if(ar[j]<=ar[j+1]){
                c++;
                savec=c;
            }
            else{
                c=1;
            }
        }

        cout<<savec;
        return 0;
}