//==================================================================
//Author        : Nguyen Trung Hieu - vuondenthanhcong11@yahoo.com
//Problem Name  : 137E - Last Chance
//Discription   :
//Reference from: http://codeforces.com/contest/137/submission/962825
//==================================================================

// -------------------- Khai bao thu vien --------------------
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>

#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>

using namespace std;

// -------------------- Khai bao cac container --------------------
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <string> vs;

typedef long long int64; //NOTES:int64
typedef unsigned long long uint64; //NOTES:uint64
typedef unsigned uint;

const double pi = acos(-1.0); //NOTES:pi
const double eps = 1e-11; //NOTES:eps
const int MAXI = 0x7fffffff;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
const char dz[] = "SENW";

// -------------------- Dinh nghia lai cac phep toan --------------------
#define FORN(i,a,b)     for (int i=(a),_b=(b); i<_b; i++)
#define RFORN(i,b,a)    for (int i=(b)-1,_a=(a); i>=_a; i--)
#define RESET(a,b)      memset((a),(b),sizeof(a))

#define SC(x)           scanf("%d",&x)
#define SC2(x,y)        scanf("%d %d",&x,&y)
#define PR(x)           printf("%d ",x)
#define PR2(x,y)        printf("%d %d ",x,y)
#define PRS(x)          printf("%s",x)
#define END             printf("\n")
#define EXIT(x)         {PRS(x);return 0;}
#define DBG(x)          {cerr << "--> " << #x << " = " << x << endl;}

#define fi              first
#define se              second
#define PB              push_back
#define ALL(x)          (x).begin(),(x).end()
#define MP(X,Y)         make_pair(X,Y)
#define foreach(i, c)   for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define present(c, x)   ((c).find(x) != (c).end())

#define two(x)          (1 << (x))
#define two64(x)        (((int64)(1)) << (x))
#define contain(s, x)   (((s) & two(x)) != 0)
#define contain64(s,x)  (((s) & two64(x)) != 0)

// =========================== Bat dau template ===========================

// -------------------- Cac thao tac nhap - xuat, debug, v.v... --------------------
void startDBG(){
    PRS("\n\n------------------- Start Debug -------------------\n\n");
}

void endDBG(){
    PRS("\n\n------------------- End Debug -------------------\n");
}

int in() {
    int x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}

int64 in64() {
    int64 x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}

void showVi(vi A){
    FORN (i, 0, A.size()) cout << A[i] << " ";
}

void showVii(vii A){
    FORN (i, 0, A.size()) cout << A[i].fi << " " << A[i].se << endl;
}

void showVs(vs A){
    FORN (i, 0, A.size()) cout << A[i] << endl;
}

void showArray(int A[], int n){
    FORN (i, 0, n) cout << A[i] << " ";
}

int MUOI(int x){
    int re = 1;
    FORN (i, 0, x) re *= 10;
    return re + x;
}

vi getVi(int SOLUONG){
    vi REVI;
    FORN (i, 0, SOLUONG){
        int GETA;
        SC(GETA);
        REVI.PB(GETA);
    }
    return REVI;
}

vs getVs(int SOLUONG){
    vs REVS;
    FORN (i, 0, SOLUONG){
        string GETS;
        cin >> GETS;
        REVS.PB(GETS);
    }
    return REVS;
}

vii getVii(int SOLUONG){
    vii REVII;
    FORN (i, 0, SOLUONG){
        int GETA, GETB;
        SC2(GETA, GETB);
        REVII.PB(MP(GETA, GETB));
    }
    return REVII;
}

template<class T> inline T checkMod(T n, T m) {
    return (n % m + m) % m;
}

template<class T> inline T multiplyMod(T a, T b, T m) {
    return (T) ((((int64) (a)*(int64) (b) % (int64) (m))+(int64) (m)) % (int64) (m));
}

template<class T> inline T powerMod(T p, int e, T m)
{
    if (e == 0)return 1 % m;
    else if (e % 2 == 0) {
        T t = powerMod(p, e / 2, m);
        return multiplyMod(t, t, m);
    } else return multiplyMod(powerMod(p, e - 1, m), p, m);
}

template<class T> inline bool isPrimeNumber(T n)
{
    if (n <= 1)return false;
    for (T i = 2; i * i <= n; i++) if (n % i == 0) return false;
    return true;
}

template<class T> inline T sqr(T x) {
    return x*x;
}

template<class T> inline T lowbit(T n) {
    return (n^(n - 1))&n;
}

template<class T> inline int countbit(T n) {
    return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}

// -------------------- Cac ham ve toan --------------------

int64 C(int m,int n)
{
    if (n > m) return 0;
    int64 re = 1;
    for(int i = 1; i <= n; i++) re = re * (m - i + 1) / i;
    return re;
}

template<class T> inline T gcd(T a, T b)
{
    if (a < 0)return gcd(-a, b);
    if (b < 0)return gcd(a, -b);
    return (b == 0) ? a : gcd(b, a % b);
}

template<class T> inline T lcm(T a, T b)
{
    if (a < 0)return lcm(-a, b);
    if (b < 0)return lcm(a, -b);
    return a * (b / gcd(a, b));
}

template<class T> inline T euclide(T a, T b, T &x, T &y)
{
    if (a < 0) {
        T d = euclide(-a, b, x, y);
        x = -x;
        return d;
    }
    if (b < 0) {
        T d = euclide(a, -b, x, y);
        y = -y;
        return d;
    }
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    } else {
        T d = euclide(b, a % b, x, y);
        T t = x;
        x = y;
        y = t - (a / b) * y;
        return d;
    }
}

template<class T> inline vector<pair<T, int> > factorize(T n)
{
    vector<pair<T, int> > R;
    for (T i = 2; n > 1;) {
        if (n % i == 0) {
            int C = 0;
            for (; n % i == 0; C++, n /= i);
            R.push_back(make_pair(i, C));
        }
        i++;
        if (i > n / i) i = n;
    }
    if (n > 1) R.push_back(make_pair(n, 1));
    return R;
}

template<class T> inline T eularFunction(T n)
{
    vector<pair<T, int> > R = factorize(n);
    T r = n;
    for (int i = 0; i < R.size(); i++)r = r / R[i].first * (R[i].first - 1);
    return r;
}

// -------------------- Cac ham ve ma tran --------------------

const int MaxMatrixSize = 40;

template<class T> inline void showMatrix(int n, T A[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++)cout << A[i][j];
        cout << endl;
    }
}

template<class T> inline void identityMatrix(int n, T A[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) A[i][j] = (i == j) ? 1 : 0;
}

template<class T> inline void addMatrix(int n, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = A[i][j] + B[i][j];
}

template<class T> inline void subMatrix(int n, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = A[i][j] - B[i][j];
}

template<class T> inline void mulMatrix(int n, T C[MaxMatrixSize][MaxMatrixSize], T _A[MaxMatrixSize][MaxMatrixSize], T _B[MaxMatrixSize][MaxMatrixSize])
{
    T A[MaxMatrixSize][MaxMatrixSize], B[MaxMatrixSize][MaxMatrixSize];
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) A[i][j] = _A[i][j], B[i][j] = _B[i][j], C[i][j] = 0;
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) for (int k = 0; k < n; k++) C[i][j] += A[i][k] * B[k][j];
}

template<class T> inline void addModMatrix(int n, T m, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = checkMod(A[i][j] + B[i][j], m);
}

template<class T> inline void subModMatrix(int n, T m, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = checkMod(A[i][j] - B[i][j], m);
}

template<class T> inline void mulModMatrix(int n, T m, T C[MaxMatrixSize][MaxMatrixSize], T _A[MaxMatrixSize][MaxMatrixSize], T _B[MaxMatrixSize][MaxMatrixSize])
{
    T A[MaxMatrixSize][MaxMatrixSize], B[MaxMatrixSize][MaxMatrixSize];
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) A[i][j] = _A[i][j], B[i][j] = _B[i][j], C[i][j] = 0;
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) for (int k = 0; k < n; k++) C[i][j] = (C[i][j] + multiplyMod(A[i][k], B[k][j], m)) % m;
}
// -------------------- Cac ham ve hinh hoc --------------------

double dist(ii a, ii b) {
    return sqrt(sqr((double)(a.fi) - (double)(b.fi)) + sqr((double)(a.se) - (double)(b.se)));
}

double distR(ii a, ii b) {
    return sqr((double)(a.fi) - (double)(b.fi)) + sqr((double)(a.se) - (double)(b.se));
}

int cross(ii c, ii a, ii b) {
    return (a.fi - c.fi)*(b.se - c.se)-(b.fi - c.fi)*(a.se - c.se);
}

int crossOper(ii c, ii a, ii b)
{
    double t = (a.fi - c.fi)*(b.se - c.se)-(b.fi - c.fi)*(a.se - c.se);
    if (fabs(t) <= eps) return 0;
    return (t < 0) ? -1 : 1;
}

bool isIntersect(ii a, ii b, ii c, ii d)
{
    return crossOper(a, b, c) * crossOper(a, b, d) < 0 && crossOper(c, d, a) * crossOper(c, d, b) < 0;
}

bool isMiddle(double s, double m, double t) {
    return fabs(s - m) <= eps | fabs(t - m) <= eps | (s < m) != (t < m);
}

// -------------------- Cac ham ve chuyen doi giua cac kieu --------------------

bool isUpperCase(char c) {
    return c >= 'A' && c <= 'Z';
}

bool isLowerCase(char c) {
    return c >= 'a' && c <= 'z';
}

bool isLetter(char c) {
    return c >= 'A' && c <= 'Z' | c >= 'a' && c <= 'z';
}

bool isDigit(char c) {
    return c >= '0' && c <= '9';
}

char toLowerCase(char c) {
    return (isUpperCase(c)) ? (c + 32) : c;
}

char toUpperCase(char c) {
    return (isLowerCase(c)) ? (c - 32) : c;
}

template<class T> string toString(T n) {
    ostringstream ost;
    ost << n;
    ost.flush();
    return ost.str();
}

int toInt(string s) {
    int r = 0;
    istringstream sin(s);
    sin >> r;
    return r;
}

int64 toInt64(string s) {
    int64 r = 0;
    istringstream sin(s);
    sin >> r;
    return r;
}

double toDouble(string s) {
    double r = 0;
    istringstream sin(s);
    sin >> r;
    return r;
}

template<class T> void stoa(string s, int &n, T A[]) {
    n = 0;
    istringstream sin(s);
    for (T v; sin >> v; A[n++] = v);
}

template<class T> void atos(int n, T A[], string &s) {
    ostringstream sout;
    for (int i = 0; i < n; i++) {
        if (i > 0)sout << ' ';
        sout << A[i];
    }
    s = sout.str();
}

template<class T> void atov(int n, T A[], vector<T> &vi) {
    vi.clear();
    for (int i = 0; i < n; i++) vi.push_back(A[i]);
}

template<class T> void vtoa(vector<T> vi, int &n, T A[]) {
    n = vi.size();
    for (int i = 0; i < n; i++)A[i] = vi[i];
}

template<class T> void stov(string s, vector<T> &vi) {
    vi.clear();
    istringstream sin(s);
    for (T v; sin >> v; vi.push_back(v));
}

template<class T> void vtos(vector<T> vi, string &s) {
    ostringstream sout;
    for (int i = 0; i < vi.size(); i++) {
        if (i > 0)sout << ' ';
        sout << vi[i];
    }
    s = sout.str();
}

// -------------------- Cac ham ve phan so --------------------

template<class T> struct Fraction {
    T a, b;
    Fraction(T a = 0, T b = 1);
    string toString();
};

template<class T> Fraction<T>::Fraction(T a, T b) {
    T d = gcd(a, b);
    a /= d;
    b /= d;
    if (b < 0) a = -a, b = -b;
    this->a = a;
    this->b = b;
}

template<class T> string Fraction<T>::toString() {
    ostringstream sout;
    sout << a << "/" << b;
    return sout.str();
}

template<class T> Fraction<T> operator+(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.b + q.a * p.b, p.b * q.b);
}

template<class T> Fraction<T> operator-(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.b - q.a * p.b, p.b * q.b);
}

template<class T> Fraction<T> operator*(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.a, p.b * q.b);
}

template<class T> Fraction<T> operator/(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.b, p.b * q.a);
}
// =========================== Ket thuc template ===========================

#define N 200005

int n;
char s[N];
int sum[N], sl[N], pos[N];

bool isVowel(char c){
    return (c == 'a' || c == 'o' || c == 'e' || c == 'u' || c == 'i');
}

int main(){
    //freopen ("input.txt", "r", stdin);
    //freopen ("output.txt", "w", stdout);
    scanf("%s", s);
    n = strlen(s);

    FORN (i, 0, n) s[i] = toLowerCase(s[i]);

    int cnt = 1, re = -MAXI, val, reCnt = 0;
    int l, r, mid;

    sl[1] = 0;
    pos[1] = -1;

    FORN (i, 0, n){
        if (isVowel(s[i])) val = -1;
        else val = 2;

        if (i == 0) sum[i] = val;
        else sum[i] = sum[i - 1] + val;

        if (sum[i] < sl[cnt]){
            cnt++;
            sl[cnt] = sum[i];
            pos[cnt] = i;
        }
        else {
            l = 0; r = cnt;
            while (r - l > 1){
                mid = (l + r) >> 1;
                if (sum[i] >= sl[mid]) r = mid;
                else l = mid;
            }

            if (sl[r] <= sum[i]){
                if (re < i - pos[r]){
                    re = i - pos[r];
                    reCnt = 1;
                }
                else if (re == i - pos[r]) reCnt++;
            }
        }
    }

    if (re == -MAXI) EXIT("No solution")
    printf("%d %d", re, reCnt);
}


//==================================================================
//Author        : Nguyen Trung Hieu - vuondenthanhcong11@yahoo.com
//Problem Name  :
//Discription   :
//Reference from:
//==================================================================

// -------------------- Khai bao thu vien --------------------
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>

#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>

using namespace std;

// -------------------- Khai bao cac container --------------------
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <string> vs;

typedef long long int64; //NOTES:int64
typedef unsigned long long uint64; //NOTES:uint64
typedef unsigned uint;

const double pi = acos(-1.0); //NOTES:pi
const double eps = 1e-11; //NOTES:eps
const int MAXI = 0x7fffffff;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
const char dz[] = "SENW";

// -------------------- Dinh nghia lai cac phep toan --------------------
#define forn(i,a,b)     for (int i=(a),_b=(b); i<_b; i++)
#define rforn(i,b,a)    for (int i=(b)-1,_a=(a); i>=_a; i--)
#define reset(a,b)      memset((a),(b),sizeof(a))

#define endline         putchar('\n')
#define space           putchar(' ')
#define EXIT(x)         {cout << x;return 0;}

#define fi              first
#define se              second
#define pb              push_back
#define all(x)          (x).begin(),(x).end()
#define mp(X,Y)         make_pair(X,Y)
#define foreach(i, c)   for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define present(c, x)   ((c).find(x) != (c).end())

#define two(x)          (1 << (x))
#define two64(x)        (((int64)(1)) << (x))
#define contain(s, x)   (((s) & two(x)) != 0)
#define contain64(s,x)  (((s) & two64(x)) != 0)

// =========================== Bat dau template ===========================

// -------------------- Cac thao tac nhap - xuat, debug, v.v... --------------------

int in() {
    int x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}

int64 in64() {
    int64 x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}

void pin(int n) { char buf[33]; int i = 30; if (n < 0) putchar('-'), n = -n; do { buf[i--] = '0'+ n % 10; n /= 10; } while (n); while (i < 30) putchar(buf[++i]); }

void pin64(int64 n) { char buf[55]; int i = 50; if (n < 0) putchar('-'), n = -n; do { buf[i--] = '0'+ n % 10; n /= 10; } while (n); while (i < 50) putchar(buf[++i]); }

// -------------------- Cac ham co ban --------------------

template<class T> inline T checkMod(T n, T m) {
    return (n % m + m) % m;
}

template<class T> inline T multiplyMod(T a, T b, T m) {
    return (T) ((((int64) (a)*(int64) (b) % (int64) (m))+(int64) (m)) % (int64) (m));
}

template<class T> inline T powerMod(T p, int e, T m)
{
    if (e == 0)return 1 % m;
    else if (e % 2 == 0) {
        T t = powerMod(p, e / 2, m);
        return multiplyMod(t, t, m);
    } else return multiplyMod(powerMod(p, e - 1, m), p, m);
}

template<class T> inline bool isPrimeNumber(T n)
{
    if (n <= 1)return false;
    for (T i = 2; i * i <= n; i++) if (n % i == 0) return false;
    return true;
}

template<class T> inline T sqr(T x) {
    return x*x;
}

template<class T> inline T lowbit(T n) {
    return (n^(n - 1))&n;
}

template<class T> inline int countbit(T n) {
    return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}

// -------------------- Cac ham ve toan --------------------

int64 C(int m,int n)
{
    if (n > m) return 0;
    int64 re = 1;
    for(int i = 1; i <= n; i++) re = re * (m - i + 1) / i;
    return re;
}

template<class T> inline T gcd(T a, T b)
{
    if (a < 0)return gcd(-a, b);
    if (b < 0)return gcd(a, -b);
    return (b == 0) ? a : gcd(b, a % b);
}

template<class T> inline T lcm(T a, T b)
{
    if (a < 0)return lcm(-a, b);
    if (b < 0)return lcm(a, -b);
    return a * (b / gcd(a, b));
}

template<class T> inline T euclide(T a, T b, T &x, T &y)
{
    if (a < 0) {
        T d = euclide(-a, b, x, y);
        x = -x;
        return d;
    }
    if (b < 0) {
        T d = euclide(a, -b, x, y);
        y = -y;
        return d;
    }
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    } else {
        T d = euclide(b, a % b, x, y);
        T t = x;
        x = y;
        y = t - (a / b) * y;
        return d;
    }
}

template<class T> inline vector<pair<T, int> > factorize(T n)
{
    vector<pair<T, int> > R;
    for (T i = 2; n > 1;) {
        if (n % i == 0) {
            int C = 0;
            for (; n % i == 0; C++, n /= i);
            R.push_back(make_pair(i, C));
        }
        i++;
        if (i > n / i) i = n;
    }
    if (n > 1) R.push_back(make_pair(n, 1));
    return R;
}

template<class T> inline T eularFunction(T n)
{
    vector<pair<T, int> > R = factorize(n);
    T r = n;
    for (int i = 0; i < R.size(); i++)r = r / R[i].first * (R[i].first - 1);
    return r;
}

// -------------------- Cac ham ve ma tran --------------------

const int MaxMatrixSize = 40;

template<class T> inline void showMatrix(int n, T A[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++)cout << A[i][j];
        cout << endl;
    }
}

template<class T> inline void identityMatrix(int n, T A[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) A[i][j] = (i == j) ? 1 : 0;
}

template<class T> inline void addMatrix(int n, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = A[i][j] + B[i][j];
}

template<class T> inline void subMatrix(int n, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = A[i][j] - B[i][j];
}

template<class T> inline void mulMatrix(int n, T C[MaxMatrixSize][MaxMatrixSize], T _A[MaxMatrixSize][MaxMatrixSize], T _B[MaxMatrixSize][MaxMatrixSize])
{
    T A[MaxMatrixSize][MaxMatrixSize], B[MaxMatrixSize][MaxMatrixSize];
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) A[i][j] = _A[i][j], B[i][j] = _B[i][j], C[i][j] = 0;
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) for (int k = 0; k < n; k++) C[i][j] += A[i][k] * B[k][j];
}

template<class T> inline void addModMatrix(int n, T m, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = checkMod(A[i][j] + B[i][j], m);
}

template<class T> inline void subModMatrix(int n, T m, T C[MaxMatrixSize][MaxMatrixSize], T A[MaxMatrixSize][MaxMatrixSize], T B[MaxMatrixSize][MaxMatrixSize])
{
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) C[i][j] = checkMod(A[i][j] - B[i][j], m);
}

template<class T> inline void mulModMatrix(int n, T m, T C[MaxMatrixSize][MaxMatrixSize], T _A[MaxMatrixSize][MaxMatrixSize], T _B[MaxMatrixSize][MaxMatrixSize])
{
    T A[MaxMatrixSize][MaxMatrixSize], B[MaxMatrixSize][MaxMatrixSize];
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) A[i][j] = _A[i][j], B[i][j] = _B[i][j], C[i][j] = 0;
    for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) for (int k = 0; k < n; k++) C[i][j] = (C[i][j] + multiplyMod(A[i][k], B[k][j], m)) % m;
}
// -------------------- Cac ham ve hinh hoc --------------------

double dist(ii a, ii b) {
    return sqrt(sqr((double)(a.fi) - (double)(b.fi)) + sqr((double)(a.se) - (double)(b.se)));
}

double distR(ii a, ii b) {
    return sqr((double)(a.fi) - (double)(b.fi)) + sqr((double)(a.se) - (double)(b.se));
}

int cross(ii c, ii a, ii b) {
    return (a.fi - c.fi)*(b.se - c.se)-(b.fi - c.fi)*(a.se - c.se);
}

int crossOper(ii c, ii a, ii b)
{
    double t = (a.fi - c.fi)*(b.se - c.se)-(b.fi - c.fi)*(a.se - c.se);
    if (fabs(t) <= eps) return 0;
    return (t < 0) ? -1 : 1;
}

bool isIntersect(ii a, ii b, ii c, ii d)
{
    return crossOper(a, b, c) * crossOper(a, b, d) < 0 && crossOper(c, d, a) * crossOper(c, d, b) < 0;
}

bool isMiddle(double s, double m, double t) {
    return fabs(s - m) <= eps | fabs(t - m) <= eps | (s < m) != (t < m);
}

// -------------------- Cac ham ve chuyen doi giua cac kieu --------------------

bool isUpperCase(char c) {
    return c >= 'A' && c <= 'Z';
}

bool isLowerCase(char c) {
    return c >= 'a' && c <= 'z';
}

bool isLetter(char c) {
    return c >= 'A' && c <= 'Z' | c >= 'a' && c <= 'z';
}

bool isDigit(char c) {
    return c >= '0' && c <= '9';
}

char toLowerCase(char c) {
    return (isUpperCase(c)) ? (c + 32) : c;
}

char toUpperCase(char c) {
    return (isLowerCase(c)) ? (c - 32) : c;
}

template<class T> string toString(T n) {
    ostringstream ost;
    ost << n;
    ost.flush();
    return ost.str();
}

int toInt(string s) {
    int r = 0;
    istringstream sin(s);
    sin >> r;
    return r;
}

int64 toInt64(string s) {
    int64 r = 0;
    istringstream sin(s);
    sin >> r;
    return r;
}

double toDouble(string s) {
    double r = 0;
    istringstream sin(s);
    sin >> r;
    return r;
}

template<class T> void stoa(string s, int &n, T A[]) {
    n = 0;
    istringstream sin(s);
    for (T v; sin >> v; A[n++] = v);
}

template<class T> void atos(int n, T A[], string &s) {
    ostringstream sout;
    for (int i = 0; i < n; i++) {
        if (i > 0)sout << ' ';
        sout << A[i];
    }
    s = sout.str();
}

template<class T> void atov(int n, T A[], vector<T> &vi) {
    vi.clear();
    for (int i = 0; i < n; i++) vi.push_back(A[i]);
}

template<class T> void vtoa(vector<T> vi, int &n, T A[]) {
    n = vi.size();
    for (int i = 0; i < n; i++)A[i] = vi[i];
}

template<class T> void stov(string s, vector<T> &vi) {
    vi.clear();
    istringstream sin(s);
    for (T v; sin >> v; vi.push_back(v));
}

template<class T> void vtos(vector<T> vi, string &s) {
    ostringstream sout;
    for (int i = 0; i < vi.size(); i++) {
        if (i > 0)sout << ' ';
        sout << vi[i];
    }
    s = sout.str();
}

// -------------------- Cac ham ve phan so --------------------

template<class T> struct Fraction {
    T a, b;
    Fraction(T a = 0, T b = 1);
    string toString();
};

template<class T> Fraction<T>::Fraction(T a, T b) {
    T d = gcd(a, b);
    a /= d;
    b /= d;
    if (b < 0) a = -a, b = -b;
    this->a = a;
    this->b = b;
}

template<class T> string Fraction<T>::toString() {
    ostringstream sout;
    sout << a << "/" << b;
    return sout.str();
}

template<class T> Fraction<T> operator+(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.b + q.a * p.b, p.b * q.b);
}

template<class T> Fraction<T> operator-(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.b - q.a * p.b, p.b * q.b);
}

template<class T> Fraction<T> operator*(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.a, p.b * q.b);
}

template<class T> Fraction<T> operator/(Fraction<T> p, Fraction<T> q) {
    return Fraction<T > (p.a * q.b, p.b * q.a);
}
// =========================== Ket thuc template ===========================

#define N 200111

int n, sl[N], pos[N], sum[N];
char s[N];

bool isVowel(char c){
    return (c == 'a' || c == 'o' || c == 'e' || c == 'u' || c == 'i');
}

int main(){
    //freopen ("input.txt", "r", stdin);
    //freopen ("output.txt", "w", stdout);
    gets(s);
    n = strlen(s);

    forn (i, 0, n) s[i] = toLowerCase(s[i]);

    int cnt = 1;
    sl[cnt] = 0;
    pos[cnt] = -1;

    int val, re = 0, reCnt = 0;
    forn (i, 0, n){
        if (isVowel(s[i])) val = -1;
        else val = 2;

        if (i) sum[i] = sum[i - 1] + val;
        else sum[i] = val;

        if (sum[i] < sl[cnt]){
            cnt++;
            sl[cnt] = sum[i];
            pos[cnt] = i;
        }
        else {
            int l = 0, r = n, mid;
            while (r - l > 1){
                mid = (r + l) >> 1;
                if (sum[i] >= sl[mid]) r = mid;
                else l = mid;
            }

            if (sl[r] <= sum[i]){
                if (re < i - pos[r]){
                    re = i - pos[r];
                    reCnt = 1;
                }
                else if (re == i - pos[r]) reCnt++;
            }
        }
    }

    printf ("%d %d", re, reCnt);
}


#include <iostream>
using namespace std;

bool vowel[256];

int max_len(const string& s)
{
    //return 18;

    int n=s.size();
    bool all_vowels=true;
    for(int i=0; i<n; i++)
    {
        if(!vowel[s[i]]) all_vowels=false;
    }
    if(all_vowels) return 0;

    int result=1;
    int iter_L=0, iter_R=0;
    int sum=vowel[s[0]];

    while(iter_L<n)
    {
        while(iter_R+1<n && 3*(sum+vowel[s[iter_R]-0])<=2*(iter_R+1-iter_L+1))
        {
            sum+=vowel[s[iter_R+1]-0];
            iter_R++;
        }

        result=max(result, iter_R-iter_L+1);

        sum-=vowel[s[iter_L]];
        iter_L++;
        if(iter_L>iter_R)
        {
            iter_R=iter_L;
            sum=vowel[s[iter_L]];
        }
    }

    sum=0;
    for(int len=1; len<=n; len++)
    {
        sum+=vowel[s[n-len]];
        if(3*sum<=2*len) result=max(result, len);
    }
    return result;
}

void solve(const string& s)
{
    int len=max_len(s);
    if(len==0)
    {
        cout << "No solution";
        return;
    }

    int n=s.size();
    int result=0;

    int sum=0;
    for(int i=0; i<len; i++) sum+=vowel[s[i]];

    for(int fin=len-1; fin<n; fin++)
    {
        if(3*sum<=2*len)
        {
            //cout << sum << '\n';
            //cout << fin << endl;
            result++;
        }
        sum-=vowel[s[fin-len+1]];
        if(fin+1<n) sum+=vowel[s[fin+1]];
    }

    cout << len << ' ' << result;
}

int main()
{
    for(char c='a'; c<='z'; c++)
    {
        switch(c)
        {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
            vowel[c]=true;
            vowel[c-'a'+'A']=true;
            break;
        default:
            vowel[c]=false;
            vowel[c-'a'+'A']=false;
            break;
        }
    }

    //for(char c='a'; c<='z'; c++) cout << c << ' ' << vowel[c] << endl;

    string s;
    cin >> s;
    solve(s);
    return 0;
}


#include <iostream>
using namespace std;

bool vowel[256];

int max_len(const string& s)
{
    //return 18;

    int n=s.size();
    bool all_vowels=true;
    for(int i=0; i<n; i++)
    {
        if(!vowel[s[i]]) all_vowels=false;
    }
    if(all_vowels) return 0;

    int result=1;
    int iter_L=0, iter_R=0;
    int sum=vowel[s[0]];

    while(iter_L<n)
    {
        while(iter_R+1<n && 3*(sum+vowel[s[iter_R]-0])<=2*(iter_R+1-iter_L+1))
        {
            sum+=vowel[s[iter_R]-0];
            iter_R++;
        }

        result=max(result, iter_R-iter_L+1);

        sum-=vowel[s[iter_L]];
        iter_L++;
        if(iter_L>iter_R)
        {
            iter_R=iter_L;
            sum=vowel[s[iter_L]];
        }
    }

    sum=0;
    for(int len=1; len<=n; len++)
    {
        sum+=vowel[s[n-len]];
        if(3*sum<=2*len) result=max(result, len);
    }
    return result;
}

void solve(const string& s)
{
    int len=max_len(s);
    if(len==0)
    {
        cout << "No solution";
        return;
    }

    int n=s.size();
    int result=0;

    int sum=0;
    for(int i=0; i<len; i++) sum+=vowel[s[i]];

    for(int fin=len-1; fin<n; fin++)
    {
        if(3*sum<=2*len)
        {
            //cout << sum << '\n';
            //cout << fin << endl;
            result++;
        }
        sum-=vowel[s[fin-len+1]];
        if(fin+1<n) sum+=vowel[s[fin+1]];
    }

    cout << len << ' ' << result;
}

int main()
{
    for(char c='a'; c<='z'; c++)
    {
        switch(c)
        {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
            vowel[c]=true;
            vowel[c-'a'+'A']=true;
            break;
        default:
            vowel[c]=false;
            vowel[c-'a'+'A']=false;
            break;
        }
    }

    //for(char c='a'; c<='z'; c++) cout << c << ' ' << vowel[c] << endl;

    string s;
    cin >> s;
    solve(s);
    return 0;
}


#include <iostream>
using namespace std;

bool vowel[256];

const int MAXN=2*100*1000+9;
int mins[MAXN];

int bin_search(int right_bound, int val)
{
    int L=0, R=right_bound, M;
    while(R-L>1)
    {
        M=(L+R)>>1;
        if(mins[M]<=val) R=M;
        else L=M;
    }
    if(mins[L]<=val) return L;
    else if(mins[R]<=val) return R;
    else return right_bound+1;
}

int max_len(const string& s)
{
    int n=s.size();
    bool all_vowels=true;
    for(int i=0; i<n; i++)
    {
        if(!vowel[s[i]]) all_vowels=false;
    }
    if(all_vowels) return 0;

    int result=1;
    mins[0]=0;
    int curr_s=0;
    for(int i=1; i<=n; i++)
    {
        int delta=vowel[s[i-1]] ? -1 : 2;
        curr_s+=delta;
        mins[i]=min(mins[i-1], curr_s);

        int leftmost_ok=bin_search(i, curr_s);
        result=max(result, i-leftmost_ok);
    }
    return result;
}

void solve(const string& s)
{
    int len=max_len(s);
    if(len==0)
    {
        cout << "No solution";
        return;
    }

    int n=s.size();
    int result=0;

    int sum=0;
    for(int i=0; i<len; i++) sum+=vowel[s[i]];

    for(int fin=len-1; fin<n; fin++)
    {
        if(3*sum<=2*len)
        {
            result++;
        }
        sum-=vowel[s[fin-len+1]];
        if(fin+1<n) sum+=vowel[s[fin+1]];
    }

    cout << len << ' ' << result;
}

int main()
{
    for(char c='a'; c<='z'; c++)
    {
        switch(c)
        {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
            vowel[c]=true;
            vowel[c-'a'+'A']=true;
            break;
        default:
            vowel[c]=false;
            vowel[c-'a'+'A']=false;
            break;
        }
    }

    //for(char c='a'; c<='z'; c++) cout << c << ' ' << vowel[c] << endl;
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin >> s;
    solve(s);
    return 0;
}


#include <iostream>
using namespace std;

bool vowel[256];

const int MAXN=2*100*1000+9;
int mins[MAXN];

int bin_search(int right_bound, int val)
{
    int L=0, R=right_bound, M;
    while(R-L>1)
    {
        M=(L+R)>>1;
        if(mins[M]<=val) R=M;
        else L=M;
    }
    if(mins[L]<=val) return L;
    else if(mins[R]<=val) return R;
    else return right_bound+1;
}

int max_len(const string& s)
{
    int n=s.size();
    bool all_vowels=true;
    for(int i=0; i<n; i++)
    {
        if(!vowel[s[i]]) all_vowels=false;
    }
    if(all_vowels) return 0;

    int result=1;
    mins[0]=0;
    int curr_s=0;
    for(int i=1; i<=n; i++)
    {
        int delta=vowel[s[i-1]] ? -1 : 2;
        curr_s+=delta;
        mins[i]=min(mins[i-1], curr_s);

        int leftmost_ok=bin_search(i, curr_s);
        result=max(result, i-leftmost_ok);
    }
    return result;
}

void solve(const string& s)
{
    int len=max_len(s);
    if(len==0)
    {
        cout << "No solution";
        return;
    }

    int n=s.size();
    int result=0;

    int sum=0;
    for(int i=0; i<len; i++) sum+=vowel[s[i]];

    for(int fin=len-1; fin<n; fin++)
    {
        if(3*sum<=2*len)
        {
            result++;
        }
        sum-=vowel[s[fin-len+1]];
        if(fin+1<n) sum+=vowel[s[fin+1]];
    }

    cout << len << ' ' << result;
}

int main()
{
    for(char c='a'; c<='z'; c++)
    {
        switch(c)
        {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
            vowel[c]=true;
            vowel[c-'a'+'A']=true;
            break;
        default:
            vowel[c]=false;
            vowel[c-'a'+'A']=false;
            break;
        }
    }

    //for(char c='a'; c<='z'; c++) cout << c << ' ' << vowel[c] << endl;

    string s;
    cin >> s;
    solve(s);
    return 0;
}


#include<iostream>
#include<string>
using namespace std;
const int maxn=2*1000*100+100;
int n,m,k,z,x,y,minn[maxn],a[maxn],sum[maxn],b[maxn],ans,mid;
string s;
int bs(int x,int y,int k){
    mid=(x+y)/2;
    if(y==x)
        return x;
    if(minn[mid]>sum[k])
        return bs(mid+1,y,k);
    return bs(x,mid,k);
}
int main(){
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(s[i]>='a')
            a[i]=int(s[i]);
        else
            a[i]=s[i]-'A'+'a';
        if(a[i]==int('a')||a[i]==int('e')||a[i]==int('o')||a[i]==int('u')||a[i]==int('i'))
            a[i]=-1;
        else
            a[i]=2;
        minn[0]=sum[0]=a[0];
        sum[i]=sum[i-1]+a[i];
        minn[i]=min(minn[i-1],sum[i]);
    }
/*    for(int i=0;i<s.size();i++)
        cout<<sum[i]<<' ';
    cout<<endl;
    for(int i=0;i<s.size();i++)
       cout<<minn[i]<<' ';
    cout<<endl;*/
    for(int i=0;i<s.size();i++){
        if(sum[i]>=0){
            ans=max(ans,i+1);
            continue;
        }
        k=bs(0,i-1,i);
        if(sum[k]>sum[i])
            continue;
   //     cout<<i<<' '<<k<<endl;
        ans=max(ans,i-k);
    }
    if(sum[ans-1]>=0)
        m++;
    for(int i=1;i<s.size()-ans+1;i++){
        x=sum[i+ans-1]-sum[i-1];
        if(x>=0)
            m++;
    }
    if(!ans){
        cout<<"No solution"<<endl;
        return 0;
    }

    cout<<ans<<" "<<m<<endl;
    return 0;
}


#include<iostream>
#include<string>
#define SY system("pause")
using namespace std;
const int maxn=2*1000*100+100;
int n,m,k,z,x,y,minn[maxn],a[maxn],sum[maxn],b[maxn],ans,mid;
string s;
int bs(int x,int y,int k){
    mid=(x+y)/2;
    if(y==x)
        return x;
    if(minn[mid]>sum[k])
        return bs(mid+1,y,k);
    return bs(x,mid,k);
}
int main(){
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(s[i]>='a')
            a[i]=int(s[i]);
        else
            a[i]=s[i]-'A'+'a';
        if(a[i]==int('a')||a[i]==int('e')||a[i]==int('o')||a[i]==int('u')||a[i]==int('i'))
            a[i]=-1;
        else
            a[i]=2;
        minn[0]=sum[0]=a[0];
        sum[i]=sum[i-1]+a[i];
        minn[i]=min(minn[i-1],sum[i]);
    }
/*    for(int i=0;i<s.size();i++)
        cout<<sum[i]<<' ';
    cout<<endl;
    for(int i=0;i<s.size();i++)
       cout<<minn[i]<<' ';
    cout<<endl;*/
    for(int i=0;i<s.size();i++){
        if(sum[i]>=0){
            ans=max(ans,i+1);
            continue;
        }
        k=bs(0,i-1,i);
        if(sum[k]>sum[i])
            continue;
   //     cout<<i<<' '<<k<<endl;
        ans=max(ans,i-k);
    }
    if(sum[ans-1]>=0)
        m++;
    for(int i=1;i<s.size()-ans+1;i++){
        x=sum[i+ans-1]-sum[i-1];
        if(x>=0)
            m++;
    }
    cout<<ans<<" "<<m<<endl;
    //SY;
    return 0;
}


#include<iostream>
#include<string>
#define SY system("pause")
using namespace std;
const int maxn=2*1000*100+100;
int n,m,k,z,x,y,minn[maxn],a[maxn],sum[maxn],l[maxn],b[maxn],ans,mid;
string s;
int bs(int x,int y,int k){
    mid=(x+y)/2;
    if(mid==x)
        return x;
    if(minn[mid]>sum[k])
        return bs(mid+1,y,k);
    else
        return bs(x,mid,k);
}
int main(){
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(s[i]>='a')
            a[i]=int(s[i]);
        else
            a[i]=s[i]-'A'+'a';
        if(a[i]==int('a')||a[i]==int('e')||a[i]==int('o')||a[i]==int('u')||a[i]==int('i')){
            a[i]=-1;
            b[i]++;
        }
        else
            a[i]=2;
        b[i]+=b[i-1];
        sum[i]=sum[i-1]+a[i];
        minn[i]=min(minn[i-1],sum[i]);
    }
    for(int i=0;i<s.size();i++){
        if(sum[i]>=0){
            l[i]=i+1;
            ans=max(ans,l[i]);
            continue;
        }
        k=bs(0,i-1,i);
        if(sum[k]>sum[i])
            continue;
        l[i]=i-k;
        ans=max(ans,l[i]);
    }
    if(sum[ans-1]>=0)
        m++;
    for(int i=1;i<s.size()-ans+1;i++){
        x=sum[i+ans-1]-sum[i-1];
        if(x>=0)
            m++;
    }
    if(!ans){
        cout<<"No solution"<<endl;
        return 0;
    }
    cout<<ans<<" "<<m<<endl;
  //  SY;
    return 0;
}


#include<iostream>
#include<string>
#define SY system("pause")
using namespace std;
const int maxn=2*1000*100+100;
int n,m,k,z,x,y,minn[maxn],a[maxn],sum[maxn],b[maxn],ans,mid;
string s;
int bs(int x,int y,int k){
    mid=(x+y)/2;
    if(y==x)
        return x;
    if(minn[mid]>sum[k])
        return bs(mid+1,y,k);
    return bs(x,mid,k);
}
int main(){
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(s[i]>='a')
            a[i]=int(s[i]);
        else
            a[i]=s[i]-'A'+'a';
        if(a[i]==int('a')||a[i]==int('e')||a[i]==int('o')||a[i]==int('u')||a[i]==int('i'))
            a[i]=-1;
        else
            a[i]=2;
        minn[0]=sum[0]=a[0];
        sum[i]=sum[i-1]+a[i];
        minn[i]=min(minn[i-1],sum[i]);
    }
/*    for(int i=0;i<s.size();i++)
        cout<<sum[i]<<' ';
    cout<<endl;
    for(int i=0;i<s.size();i++)
       cout<<minn[i]<<' ';
    cout<<endl;*/
    for(int i=0;i<s.size();i++){
        if(sum[i]>=0){
            ans=max(ans,i+1);
            continue;
        }
        k=bs(0,i-1,i);
        if(sum[k]>sum[i])
            continue;
   //     cout<<i<<' '<<k<<endl;
        ans=max(ans,i-k);
    }
    if(sum[ans-1]>=0)
        m++;
    for(int i=1;i<s.size()-ans+1;i++){
        x=sum[i+ans-1]-sum[i-1];
        if(x>=0)
            m++;
    }
    cout<<ans<<" "<<m<<endl;
    SY;
    return 0;
}


#include<iostream>
#include<string>
using namespace std;
const int maxn=2*1000*100+100;
int n,m,k,z,x,y,minn[maxn],a[maxn],sum[maxn],b[maxn],ans,mid;
string s;
int bs(int x,int y,int k){
    mid=(x+y)/2;
    if(y==x)
        return x;
    if(minn[mid]>sum[k])
        return bs(mid+1,y,k);
    return bs(x,mid,k);
}
int main(){
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(s[i]>='a')
            a[i]=int(s[i]);
        else
            a[i]=s[i]-'A'+'a';
        if(a[i]==int('a')||a[i]==int('e')||a[i]==int('o')||a[i]==int('u')||a[i]==int('i'))
            a[i]=-1;
        else
            a[i]=2;
        minn[0]=sum[0]=a[0];
        sum[i]=sum[i-1]+a[i];
        minn[i]=min(minn[i-1],sum[i]);
    }
/*    for(int i=0;i<s.size();i++)
        cout<<sum[i]<<' ';
    cout<<endl;
    for(int i=0;i<s.size();i++)
       cout<<minn[i]<<' ';
    cout<<endl;*/
    for(int i=0;i<s.size();i++){
        if(sum[i]>=0){
            ans=max(ans,i+1);
            continue;
        }
        k=bs(0,i-1,i);
        if(sum[k]>sum[i])
            continue;
   //     cout<<i<<' '<<k<<endl;
        ans=max(ans,i-k);
    }
    if(sum[ans-1]>=0)
        m++;
    for(int i=1;i<s.size()-ans+1;i++){
        x=sum[i+ans-1]-sum[i-1];
        if(x>=0)
            m++;
    }
    cout<<ans<<" "<<m<<endl;
    return 0;
}


#include<iostream>
#include<string>
#define SY system("pause")
using namespace std;
const int maxn=2*1000*100+100;
int n,m,k,z,x,y,minn[maxn],a[maxn],sum[maxn],l[maxn],b[maxn],ans,mid;
string s;
int bs(int x,int y,int k){
    mid=(x+y)/2;
    if(y==x)
        return x;
    if(minn[mid]>sum[k])
        return bs(mid+1,y,k);
    else
        return bs(x,mid,k);
}
int main(){
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(s[i]>='a')
            a[i]=int(s[i]);
        else
            a[i]=s[i]-'A'+'a';
        if(a[i]==int('a')||a[i]==int('e')||a[i]==int('o')||a[i]==int('u')||a[i]==int('i')){
            a[i]=-1;
            b[i]++;
        }
        else
            a[i]=2;
        b[i]+=b[i-1];
        sum[i]=sum[i-1]+a[i];
        minn[i].0=min(minn[i-1],sum[i]);
    }
    for(int i=0;i<s.size();i++){
        if(sum[i]>=0){
            l[i]=i+1;
            ans=max(ans,l[i]);
            continue;
        }
        k=bs(0,i-1,i);
        if(sum[k]>sum[i])
            continue;
        l[i]=i-k;
        ans=max(ans,l[i]);
    }
    if(sum[ans-1]>=0)
        m++;
    for(int i=1;i<s.size()-ans+1;i++){
        x=sum[i+ans-1]-sum[i-1];
        if(x>=0)
            m++;
    }
    if(!ans){
        cout<<"No solution"<<endl;
        return 0;
    }
    cout<<ans<<" "<<m<<endl;

    //SY;
    return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<set>
#include<map>
#include<string>
#include<sstream>

#include<cstring>
#include<cstdio>
#include<cmath>
#include<cassert>
#include<cctype>
using namespace std;

const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<bool> VB;
typedef pair<int,int> PII;
typedef vector<PII> VII;

const int inf = 1010101010;
const double PI = 4*atan(1);

#define REP(i,n)for(int i=0;i<(n);i++)
#define FOR(i,a,b)for(int i=(a);i<(b);i++)
#define FOREACH(v,it)for(typeof((v).begin())it=(v).begin();it!=(v).end();++it)

#define append push_back
#define MP make_pair
#define len(v) ((int)(v).size())

#define ALL(v) (v).begin(),(v).end()

bool is_vowel[256] = {};
string s;
int n;
VI cumsu;

int cnt(int le)
{
  int res = 0;
  REP(i, n - le + 1)
  {
    if (3 * (cumsu[i + le] - cumsu[i]) <= 2 * le) res ++;
  }
  return res;
}

int main()
{
  is_vowel['a'] = true; is_vowel['A'] = true;
  is_vowel['e'] = true; is_vowel['E'] = true;
  is_vowel['i'] = true; is_vowel['I'] = true;
  is_vowel['o'] = true; is_vowel['O'] = true;
  is_vowel['u'] = true; is_vowel['U'] = true;

  cin >> s;
  n = len(s);

  cumsu = VI (n + 1);
  REP(i, n) cumsu[i + 1] = cumsu[i] + is_vowel[s[i]];

  int lo = 0, hi = n;
  while (lo - hi)
  {
    int mi = (lo + hi + 1) / 2;

    if (cnt(mi)) lo = mi;
    else hi = mi - 1;
  }
  if (lo == 0)
  {
    puts("No solution");
  }
  else cout << lo << " " << cnt(lo) << endl;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<set>
#include<map>
#include<string>
#include<sstream>

#include<cstring>
#include<cstdio>
#include<cmath>
#include<cassert>
#include<cctype>
using namespace std;

const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<bool> VB;
typedef pair<int,int> PII;
typedef vector<PII> VII;

const int inf = 1010101010;
const double PI = 4*atan(1);

#define REP(i,n)for(int i=0;i<(n);i++)
#define FOR(i,a,b)for(int i=(a);i<(b);i++)
#define FOREACH(v,it)for(typeof((v).begin())it=(v).begin();it!=(v).end();++it)

#define append push_back
#define MP make_pair
#define len(v) ((int)(v).size())

#define ALL(v) (v).begin(),(v).end()

bool is_vowel[256] = {};
string s;
int n;
VI cumsu;

int cnt(int le)
{
  int res = 0;
  REP(i, n - le + 1)
  {
    if (3 * (cumsu[i + le] - cumsu[i]) <= 2 * le) res ++;
  }
  return res;
}

int main()
{
  is_vowel['a'] = true; is_vowel['A'] = true;
  is_vowel['e'] = true; is_vowel['E'] = true;
  is_vowel['i'] = true; is_vowel['I'] = true;
  is_vowel['o'] = true; is_vowel['O'] = true;
  is_vowel['u'] = true; is_vowel['U'] = true;

  cin >> s;
  n = len(s);

  cumsu = VI (n + 1);
  REP(i, n) cumsu[i + 1] = cumsu[i] + is_vowel[s[i]];

  int M = 0;
  REP(r, 3)
  {
    int lo = 0, hi = 0; while ((hi + 1) * 3 + r <= n) hi ++;
    while (lo - hi)
    {
      int mi = (lo + hi + 1) / 2;

      if (cnt(3 * mi + r)) lo = mi;
      else hi = mi - 1;
    }
    M = max(M, 3 * lo + r);
  }
  while (!cnt(M)) M --;
  if (M == 0)
  {
    puts("No solution");
  }
  else
  {
    cout << M << " " << cnt(M) << endl;
  }
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<set>
#include<map>
#include<string>
#include<sstream>

#include<cstring>
#include<cstdio>
#include<cmath>
#include<cassert>
#include<cctype>
using namespace std;

#include<utility>
using namespace rel_ops;

const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<bool> VB;
typedef pair<int,int> PII;
typedef vector<PII> VII;

const int inf = 1010101010;
const double PI = 4*atan(1);

#define REP(i,n)for(int i=0;i<(n);i++)
#define FOR(i,a,b)for(int i=(a);i<(b);i++)
#define FOREACH(v,it)for(typeof((v).begin())it=(v).begin();it!=(v).end();++it)

#define append push_back
#define MP make_pair
#define len(v) ((int)(v).size())

#define ALL(v) (v).begin(),(v).end()

bool is_vowel[256] = {};

#define h(x) (3*f[x]-2*(x))

int main()
{
  is_vowel['a'] = true; is_vowel['A'] = true;
  is_vowel['e'] = true; is_vowel['E'] = true;
  is_vowel['i'] = true; is_vowel['I'] = true;
  is_vowel['o'] = true; is_vowel['O'] = true;
  is_vowel['u'] = true; is_vowel['U'] = true;

  string s; cin >> s;
  int n = len(s);

  VI f(n + 1);
  REP(i, n) f[i + 1] = f[i] + is_vowel[s[i]];

  int mx = 0, cnt = 0;
  VI cands;
  cands.append(n);
  for (int i = n - 1; i >= 0; i --)
  {
    if (h(cands[len(cands) - 1]) > h(i))
    {
      cands.append(i);
    }
    else
    {
      int lo = 0, hi = len(cands) - 1;
      while (lo - hi)
      {
        int mi = (lo + hi) / 2;
        if (h(cands[mi]) <= h(i))
        {
          hi = mi;
        }
        else lo = mi + 1;
      }
      int j = cands[lo];
      if (j - i == mx) { cnt ++; }
      else if (j - i > mx) { mx = j - i; cnt = 1; }
    }
  }
  if (mx)
  {
    cout << mx << " " << cnt << endl;
  }
  else
  {
    puts("No solution");
  }
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<set>
#include<map>
#include<string>
#include<sstream>

#include<cstring>
#include<cstdio>
#include<cmath>
#include<cassert>
#include<cctype>
using namespace std;

const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<bool> VB;
typedef pair<int,int> PII;
typedef vector<PII> VII;

const int inf = 1010101010;
const double PI = 4*atan(1);

#define REP(i,n)for(int i=0;i<(n);i++)
#define FOR(i,a,b)for(int i=(a);i<(b);i++)
#define FOREACH(v,it)for(typeof((v).begin())it=(v).begin();it!=(v).end();++it)

#define append push_back
#define MP make_pair
#define len(v) ((int)(v).size())

#define ALL(v) (v).begin(),(v).end()

bool is_vowel[256] = {};
string s;
int n;
VI cumsu;

int cnt(int le)
{
  int res = 0;
  REP(i, n - le + 1)
  {
    if (3 * (cumsu[i + le] - cumsu[i]) <= 2 * le) res ++;
  }
  return res;
}

int main()
{
  is_vowel['a'] = true; is_vowel['A'] = true;
  is_vowel['e'] = true; is_vowel['E'] = true;
  is_vowel['i'] = true; is_vowel['I'] = true;
  is_vowel['o'] = true; is_vowel['O'] = true;
  is_vowel['u'] = true; is_vowel['U'] = true;

  cin >> s;
  n = len(s);

  cumsu = VI (n + 1);
  REP(i, n) cumsu[i + 1] = cumsu[i] + is_vowel[s[i]];

  int M = 0;
  REP(r, 3)
  {
    int lo = 0, hi = 0; while ((hi + 1) * 3 + r <= n) hi ++;
    while (lo - hi)
    {
      int mi = (lo + hi + 1) / 2;

      if (cnt(mi)) lo = mi;
      else hi = mi - 1;
    }
    M = max(M, lo);
  }
  if (M == 0)
  {
    puts("No solution");
  }
  else cout << M << " " << cnt(M) << endl;

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<set>
#include<map>
#include<string>
#include<sstream>

#include<cstring>
#include<cstdio>
#include<cmath>
#include<cassert>
#include<cctype>
using namespace std;

const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<bool> VB;
typedef pair<int,int> PII;
typedef vector<PII> VII;

const int inf = 1010101010;
const double PI = 4*atan(1);

#define REP(i,n)for(int i=0;i<(n);i++)
#define FOR(i,a,b)for(int i=(a);i<(b);i++)
#define FOREACH(v,it)for(typeof((v).begin())it=(v).begin();it!=(v).end();++it)

#define append push_back
#define MP make_pair
#define len(v) ((int)(v).size())

#define ALL(v) (v).begin(),(v).end()

bool is_vowel[256] = {};
string s;
int n;
VI cumsu;

int cnt(int le)
{
  int res = 0;
  REP(i, n - le + 1)
  {
    if (3 * (cumsu[i + le] - cumsu[i]) <= 2 * le) res ++;
  }
  return res;
}

int main()
{
  is_vowel['a'] = true; is_vowel['A'] = true;
  is_vowel['e'] = true; is_vowel['E'] = true;
  is_vowel['i'] = true; is_vowel['I'] = true;
  is_vowel['o'] = true; is_vowel['O'] = true;
  is_vowel['u'] = true; is_vowel['U'] = true;

  cin >> s;
  n = len(s);

  cumsu = VI (n + 1);
  REP(i, n) cumsu[i + 1] = cumsu[i] + is_vowel[s[i]];

  int M = 0;
  REP(r, 3)
  {
    int lo = 0, hi = 0; while ((hi + 1) * 3 + r <= n) hi ++;
    while (lo - hi)
    {
      int mi = (lo + hi + 1) / 2;

      if (cnt(3 * mi + r)) lo = mi;
      else hi = mi - 1;
    }
    M = max(M, 3 * lo + r);
  }
  if (M == 0)
  {
    puts("No solution");
  }
  else cout << M << " " << cnt(M) << endl;

}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vp;
typedef vector<vi> vvi;

const int N = 200010;
const int M = 10010;
const int K = 510;
const int LIT = 2500;
const int INF = 1 << 30;

#define mp make_pair
#define pb push_back
#define fst first
#define snd second

string s;
string vl = "aeiouAEIOU";
bool num[N];
int len, sum[N];

bool check(char c)
{
    int m = 10;
    for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
    return 0;
}

void init()
{
    memset(num, 0, sizeof(num));
    memset(sum, 0, sizeof(sum));
    len = s.size();
    for(int i = 0; i < len; i++)
    {
        if(check(s[i])) num[i] = 1;
        else num[i] = 0;
    }
}

int ok(int sz)
{
    int cnt[3] = {0}, res = 0;
    for(int i = 0; i < sz; i++)
    {
        cnt[num[i]]++;
    }
    for(int i = sz, j = 0; i < len; i++, j++)
    {
        cnt[num[i]]++;
        if(cnt[1] <= 2 * cnt[0]) res++;
        cnt[num[j]]--;
    }
    return res;
}

void solve()
{
    int l = 1, r = len + 1, ans = 0;
    for(int i = 0; i < len; i++) if(!num[i]) ans++;
    if(!ans)
    {
        cout<<"No solution"<<endl;
        return ;
    }
    while(l < r)
    {
        int mid = (l + r) / 2;
        int tmp = ok(mid);
        if(tmp) l = mid + 1, ans = tmp;
        else r = mid;
    }
    //cout<<l<<" "<<r<<endl;
    //l--;

    int q = 100;
    for(int i = l+q; i >= l; i--)
    {
        int tmp = ok(i);
        if(tmp) l = i, ans = tmp;
    }

    if(!ans) cout<<"No solution"<<endl;
    else cout<<l<<" "<<ans<<endl;
}

int main()
{
    //freopen("in.txt", "r", stdin);

    while(cin>>s)
    {
        init();
        solve();
    }
    //while(1);
}


    #include <iostream>
    #include <cstdio>
    #include <cstring>
    #include <algorithm>
    #include <vector>
    #include <queue>
    #include <stack>
    #include <string>
    #include <set>
    #include <map>
    using namespace std;

    typedef long long ll;
    typedef vector<int> vi;
    typedef pair<int, int> pii;
    typedef vector<pii> vp;
    typedef vector<vi> vvi;

    const int N = 200010;
    const int M = 10010;
    const int K = 510;
    const int LIT = 2500;
    const int INF = 1 << 30;

    #define mp make_pair
    #define pb push_back
    #define fst first
    #define snd second

    string s;
    string vl = "aeiouAEIOU";
    bool num[N];
    int len;

    bool check(char c)
    {
        int m = 10;
        for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
        return 0;
    }

    void init()
    {
        memset(num, 0, sizeof(num));
        len = s.size();
        for(int i = 0; i < len; i++)
        {
            if(check(s[i])) num[i] = 1;
            else num[i] = 0;
        }
    }

    int ok(int sz)
    {
        int cnt[3] = {0}, res = 0;
        for(int i = 0; i < sz; i++)
        {
            cnt[num[i]]++;
        }
        for(int i = sz, j = 0; i < len; i++, j++)
        {
            cnt[num[i]]++;
            if(cnt[1] <= 2 * cnt[0]) res++;
            cnt[num[j]]--;
        }
        return res;
    }

    void solve()
    {
        int l = 1, r = len + 1, ans = 0;
        for(int i = 0; i < len; i++) if(!num[i]) ans++;
        if(!ans)
        {
            cout<<"No solution"<<endl;
            return ;
        }
        while(l < r)
        {
            int mid = (l + r) / 2;
            int tmp = ok(mid);
            if(tmp) l = mid + 1, ans = tmp;
            else r = mid;
        }
        //cout<<l<<" "<<r<<endl;
        //l--;

        int q = 100;
        for(int i = min(l + q, len); i >= l; i--)
        {
            int tmp = ok(i);
            if(tmp) {l = i, ans = tmp; break;}
        }

        if(!ans) cout<<"No solution"<<endl;
        else cout<<l<<" "<<ans<<endl;
    }

    int main()
    {
        //freopen("in.txt", "r", stdin);

        while(cin>>s)
        {
            init();
            solve();
        }
        //while(1);
    }


    #include <iostream>
    #include <cstdio>
    #include <cstring>
    #include <algorithm>
    #include <vector>
    #include <queue>
    #include <stack>
    #include <string>
    #include <set>
    #include <map>
    using namespace std;

    typedef long long ll;
    typedef vector<int> vi;
    typedef pair<int, int> pii;
    typedef vector<pii> vp;
    typedef vector<vi> vvi;

    const int N = 200010;
    const int M = 10010;
    const int K = 510;
    const int LIT = 2500;
    const int INF = 1 << 30;

    #define mp make_pair
    #define pb push_back
    #define fst first
    #define snd second

    string s;
    string vl = "aeiouAEIOU";
    bool num[N];
    int len;

    bool check(char c)
    {
        int m = 10;
        for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
        return 0;
    }

    void init()
    {
        memset(num, 0, sizeof(num));
        len = s.size();
        for(int i = 0; i < len; i++)
        {
            if(check(s[i])) num[i] = 1;
            else num[i] = 0;
        }
    }

    int ok(int sz)
    {
        int cnt[3] = {0}, res = 0;
        for(int i = 0; i < sz; i++)
        {
            cnt[num[i]]++;
        }
        for(int i = sz, j = 0; i < len; i++, j++)
        {
            cnt[num[i]]++;
            if(cnt[1] <= 2 * cnt[0]) res++;
            cnt[num[j]]--;
        }
        return res;
    }

    void solve()
    {
        int l = 1, r = len + 1, ans = 0;
        for(int i = 0; i < len; i++) if(!num[i]) ans++;
        if(!ans)
        {
            cout<<"No solution"<<endl;
            return ;
        }
        while(l < r)
        {
            int mid = (l + r) / 2;
            int tmp = ok(mid);
            if(tmp) l = mid + 1, ans = tmp;
            else r = mid;
        }
        //cout<<l<<" "<<r<<endl;
        //l--;

        int q = 500;
        for(int i = min(l + q, len); i >= l; i--)
        {
            int tmp = ok(i);
            if(tmp) {l = i, ans = tmp; break;}
        }

        if(!ans) cout<<"No solution"<<endl;
        else cout<<l<<" "<<ans<<endl;
    }

    int main()
    {
        //freopen("in.txt", "r", stdin);

        while(cin>>s)
        {
            init();
            solve();
        }
        //while(1);
    }


    #include <iostream>
    #include <cstdio>
    #include <cstring>
    #include <algorithm>
    #include <vector>
    #include <queue>
    #include <stack>
    #include <string>
    #include <set>
    #include <map>
    using namespace std;

    typedef long long ll;
    typedef vector<int> vi;
    typedef pair<int, int> pii;
    typedef vector<pii> vp;
    typedef vector<vi> vvi;

    const int N = 200010;
    const int M = 10010;
    const int K = 510;
    const int LIT = 2500;
    const int INF = 1 << 30;

    #define mp make_pair
    #define pb push_back
    #define fst first
    #define snd second

    string s;
    string vl = "aeiouAEIOU";
    bool num[N];
    int len;

    bool check(char c)
    {
        int m = 10;
        for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
        return 0;
    }

    void init()
    {
        memset(num, 0, sizeof(num));
        len = s.size();
        for(int i = 0; i < len; i++)
        {
            if(check(s[i])) num[i] = 1;
            else num[i] = 0;
        }
    }

    int ok(int sz)
    {
        int cnt[3] = {0}, res = 0;
        for(int i = 0; i < sz; i++)
        {
            cnt[num[i]]++;
        }
        for(int i = sz, j = 0; i < len; i++, j++)
        {
            cnt[num[i]]++;
            if(cnt[1] <= 2 * cnt[0]) res++;
            cnt[num[j]]--;
        }
        return res;
    }

    void solve()
    {
        int l = 1, r = len + 1, ans = 0;
        for(int i = 0; i < len; i++) if(!num[i]) ans++;
        if(!ans)
        {
            cout<<"No solution"<<endl;
            return ;
        }
        while(l < r)
        {
            int mid = (l + r) / 2;
            int tmp = ok(mid);
            if(tmp) l = mid + 1, ans = tmp;
            else r = mid;
        }
        //cout<<l<<" "<<r<<endl;
        //l--;

        int q = 300;
        for(int i = min(l + q, len); i >= l; i--)
        {
            int tmp = ok(i);
            if(tmp) {l = i, ans = tmp; break;}
        }

        if(!ans) cout<<"No solution"<<endl;
        else cout<<l<<" "<<ans<<endl;
    }

    int main()
    {
        //freopen("in.txt", "r", stdin);

        while(cin>>s)
        {
            init();
            solve();
        }
        //while(1);
    }


    #include <iostream>
    #include <cstdio>
    #include <cstring>
    #include <algorithm>
    #include <vector>
    #include <queue>
    #include <stack>
    #include <string>
    #include <set>
    #include <map>
    using namespace std;

    typedef long long ll;
    typedef vector<int> vi;
    typedef pair<int, int> pii;
    typedef vector<pii> vp;
    typedef vector<vi> vvi;

    const int N = 200010;
    const int M = 10010;
    const int K = 510;
    const int LIT = 2500;
    const int INF = 1 << 30;

    #define mp make_pair
    #define pb push_back
    #define fst first
    #define snd second

    string s;
    string vl = "aeiouAEIOU";
    bool num[N];
    int len;

    bool check(char c)
    {
        int m = 10;
        for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
        return 0;
    }

    void init()
    {
        memset(num, 0, sizeof(num));
        len = s.size();
        for(int i = 0; i < len; i++)
        {
            if(check(s[i])) num[i] = 1;
            else num[i] = 0;
        }
    }

    int ok(int sz)
    {
        int cnt[3] = {0}, res = 0;
        for(int i = 0; i < sz; i++)
        {
            cnt[num[i]]++;
        }
        for(int i = sz, j = 0; i < len; i++, j++)
        {
            cnt[num[i]]++;
            if(cnt[1] <= 2 * cnt[0]) res++;
            cnt[num[j]]--;
        }
        return res;
    }

    void solve()
    {
        int l = 1, r = len + 1, ans = 0;
        for(int i = 0; i < len; i++) if(!num[i]) ans++;
        if(!ans)
        {
            cout<<"No solution"<<endl;
            return ;
        }
        while(l < r)
        {
            int mid = (l + r) / 2;
            int tmp = ok(mid);
            if(tmp) l = mid + 1, ans = tmp;
            else r = mid;
        }
        //cout<<l<<" "<<r<<endl;
        //l--;

        int q = 100;
        for(int i = min(l + q, len); i >= l; i--)
        {
            int tmp = ok(i);
            if(tmp) {l = i, ans = tmp; break;}
        }
        if(l == 1856) cout<<len<<endl;
        if(!ans) cout<<"No solution"<<endl;
        else cout<<l<<" "<<ans<<endl;
    }

    int main()
    {
        //freopen("in.txt", "r", stdin);

        while(cin>>s)
        {
            init();
            solve();
        }
        //while(1);
    }


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vp;
typedef vector<vi> vvi;

const int N = 200010;
const int M = 10010;
const int K = 510;
const int LIT = 2500;
const int INF = 1 << 30;

#define mp make_pair
#define pb push_back
#define fst first
#define snd second

string s;
string vl = "aeiouAEIOU";
bool num[N];
int len;

bool check(char c)
{
    int m = 10;
    for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
    return 0;
}

void init()
{
    memset(num, 0, sizeof(num));
    len = s.size();
    for(int i = 0; i < len; i++)
    {
        if(check(s[i])) num[i] = 1;
        else num[i] = 0;
    }
}

int ok(int sz)
{
    int cnt[3] = {0}, res = 0;
    for(int i = 0; i < sz; i++)
    {
        cnt[num[i]]++;
    }
    for(int i = sz, j = 0; i < len; i++, j++)
    {
        cnt[num[i]]++;
        if(cnt[1] <= 2 * cnt[0]) res++;
        cnt[num[j]]--;
    }
    return res;
}

void solve()
{
    int l = 1, r = len + 1, ans = 0;
    for(int i = 0; i < len; i++) if(!num[i]) ans++;
    if(!ans)
    {
        cout<<"No solution"<<endl;
        return ;
    }
    while(l < r)
    {
        int mid = (l + r) / 2;
        int tmp = ok(mid);
        if(tmp) l = mid + 1, ans = tmp;
        else r = mid;
    }
    //cout<<l<<" "<<r<<endl;
    //l--;
    if(!ans) cout<<"No solution"<<endl;
    else cout<<l<<" "<<ans<<endl;
}

int main()
{
    //freopen("in.txt", "r", stdin);

    while(cin>>s)
    {
        init();
        solve();
    }
    //while(1);
}


    #include <iostream>
    #include <cstdio>
    #include <cstring>
    #include <algorithm>
    #include <vector>
    #include <queue>
    #include <stack>
    #include <string>
    #include <set>
    #include <map>
    using namespace std;

    typedef long long ll;
    typedef vector<int> vi;
    typedef pair<int, int> pii;
    typedef vector<pii> vp;
    typedef vector<vi> vvi;

    const int N = 200010;
    const int M = 10010;
    const int K = 510;
    const int LIT = 2500;
    const int INF = 1 << 30;

    #define mp make_pair
    #define pb push_back
    #define fst first
    #define snd second

    string s;
    string vl = "aeiouAEIOU";
    bool num[N];
    int len;

    bool check(char c)
    {
        int m = 10;
        for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
        return 0;
    }

    void init()
    {
        memset(num, 0, sizeof(num));
        len = s.size();
        for(int i = 0; i < len; i++)
        {
            if(check(s[i])) num[i] = 1;
            else num[i] = 0;
        }
    }

    int ok(int sz)
    {
        int cnt[3] = {0}, res = 0;
        for(int i = 0; i < sz; i++)
        {
            cnt[num[i]]++;
        }
        for(int i = sz, j = 0; i < len; i++, j++)
        {
            cnt[num[i]]++;
            if(cnt[1] <= 2 * cnt[0]) res++;
            cnt[num[j]]--;
        }
        return res;
    }

    void solve()
    {
        int l = 1, r = len + 1, ans = 0;
        for(int i = 0; i < len; i++) if(!num[i]) ans++;
        if(!ans)
        {
            cout<<"No solution"<<endl;
            return ;
        }
        while(l < r)
        {
            int mid = (l + r) / 2;
            int tmp = ok(mid);
            if(tmp) l = mid + 1, ans = tmp;
            else r = mid;
        }

        int q = 100;
        //cout<<(l+q)<<" "<<len<<" "<<min(l + q, len)<<" "<<l<<endl;
        for(int i = min(l + q, len); i >= l; i--)
        {
            int tmp = ok(i);
            if(tmp)
            {
                l = i+1, ans = tmp; break;
                //cout<<"yes"<<endl;
            }
        }

        if(!ans) cout<<"No solution"<<endl;
        else cout<<l<<" "<<ans<<endl;
    }

    int main()
    {
        //freopen("in.txt", "r", stdin);

        while(cin>>s)
        {
            init();
            solve();
        }
        //while(1);
    }


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vp;
typedef vector<vi> vvi;

const int N = 100010;
const int M = 10010;
const int K = 510;
const int LIT = 2500;
const int INF = 1 << 30;

#define mp make_pair
#define pb push_back
#define fst first
#define snd second

string s;
string vl = "aeiouAEIOU";
bool num[N];
int len;

bool check(char c)
{
    int m = 10;
    for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
    return 0;
}

void init()
{

    len = s.size();
    for(int i = 0; i < len; i++)
    {
        if(check(s[i])) num[i] = 1;
        else num[i] = 0;
    }
}

int ok(int sz)
{
    int cnt[3] = {0}, res = 0;
    for(int i = 0; i < sz; i++)
    {
        cnt[num[i]]++;
    }
    for(int i = sz, j = 0; i < len; i++, j++)
    {
        cnt[num[i]]++;
        if(cnt[1] <= 2 * cnt[0]) res++;
        cnt[num[j]]--;
    }
    return res;
}

void solve()
{
    int l = 1, r = len + 1, ans = -1;
    while(l < r)
    {
        int mid = (l + r) / 2;
        int tmp = ok(mid);
        if(tmp) l = mid + 1, ans = tmp;
        else r = mid;
    }
    //cout<<l<<" "<<r<<endl;
    //l--;
    if(ans == -1) cout<<"No solution"<<endl;
    else cout<<l<<" "<<ans<<endl;
}

int main()
{
    //freopen("in.txt", "r", stdin);

    while(cin>>s)
    {
        init();
        solve();
    }
    //while(1);
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vp;
typedef vector<vi> vvi;

const int N = 100010;
const int M = 10010;
const int K = 510;
const int LIT = 2500;
const int INF = 1 << 30;

#define mp make_pair
#define pb push_back
#define fst first
#define snd second

string s;
string vl = "aeiouAEIOU";
bool num[N];
int len;

bool check(char c)
{
    int m = 10;
    for(int i = 0; i < m; i++) if(c == vl[i]) return 1;
    return 0;
}

void init()
{

    len = s.size();
    for(int i = 0; i < len; i++)
    {
        if(check(s[i])) num[i] = 1;
        else num[i] = 0;
    }
}

int ok(int sz)
{
    int cnt[3] = {0}, res = 0;
    for(int i = 0; i < sz; i++)
    {
        cnt[num[i]]++;
    }
    for(int i = sz, j = 0; i < len; i++, j++)
    {
        cnt[num[i]]++;
        if(cnt[1] <= 2 * cnt[0]) res++;
        cnt[num[j]]--;
    }
    return res;
}

void solve()
{
    int l = 1, r = len + 1, ans = 0;
    for(int i = 0; i < len; i++) if(!num[i]) ans++;
    if(!ans)
    {
        cout<<"No solution"<<endl;
        return ;
    }
    while(l < r)
    {
        int mid = (l + r) / 2;
        int tmp = ok(mid);
        if(tmp) l = mid + 1, ans = tmp;
        else r = mid;
    }
    //cout<<l<<" "<<r<<endl;
    //l--;
    if(!ans) cout<<"No solution"<<endl;
    else cout<<l<<" "<<ans<<endl;
}

int main()
{
    //freopen("in.txt", "r", stdin);

    while(cin>>s)
    {
        init();
        solve();
    }
    //while(1);
}


#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>

using namespace std;

//#define NDEBUG
#if defined(NDEBUG)
#define DBG_CODE(cb...)
#else
#define DBG_CODE(cb...) cb
#endif
#define WRITE(x) DBG_CODE(cout << x << endl)
#define WATCH(x) DBG_CODE(cout << #x << "=" << x << endl)
#define FORN(i, a, b) for(typeof(b) i = (a); i < (b); i++)
#define ALL(x) x.begin(), x.end()
#define FOREACH(i, c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

bool is_vowel(char c)
{
	c = tolower(c);
	if(c == 'a') return true;
	if(c == 'e') return true;
	if(c == 'i') return true;
	if(c == 'o') return true;
	if(c == 'u') return true;
	return false;
}

int main(){
	ios::sync_with_stdio(false);
	string s;
	cin >> s;
	int n = int(s.size());
	vector<int> v(n);
	FORN(i, 0, n) v[i] = is_vowel(s[i]) ? -1 : 2;

	vector<int> hope(n);
	hope[0] = v[0];
	FORN(i, 1, n) hope[i] = max(hope[i - 1] + v[i], v[i]);
	vector<int> psum(n);
	psum[0] = v[0];
	FORN(i, 1, n) psum[i] = psum[i - 1] + v[i];

	int maxsz = 0;
	int e = n - 1;
	while(e >= 0){
		int b = e - maxsz;
		if(b < 0) break;
		int acc = psum[e] - (b ? psum[b - 1] : 0);
		b--;
		if((b < 0 ? 0 : hope[b]) + acc < 0){
			e--;
			continue;
		}

		while(true){
			while(b >= 0 and acc < 0) acc += v[b--];
			while(b >= 0 and acc + v[b] >= 0) acc += v[b--];
			if(b < 0 or hope[b] < 0) break;
			acc += v[b--];
		}
		int sz = e - b;
		maxsz = max(maxsz, sz);

		e--;
	}

	if(maxsz){
		int count = 0;
		FORN(b, 0, n - maxsz + 1){
			int e = b + maxsz - 1;
			int sum = psum[e] - (b ? psum[b - 1] : 0);
			if(sum >= 0) count++;
		}
		cout << maxsz << " " << count << endl;
	}else{
		cout << "No solution" << endl;
	}

}


#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>

using namespace std;

//#define NDEBUG
#if defined(NDEBUG)
#define DBG_CODE(cb...)
#else
#define DBG_CODE(cb...) cb
#endif
#define WRITE(x) DBG_CODE(cout << x << endl)
#define WATCH(x) DBG_CODE(cout << #x << "=" << x << endl)
#define FORN(i, a, b) for(typeof(b) i = (a); i < (b); i++)
#define ALL(x) x.begin(), x.end()
#define FOREACH(i, c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

bool is_vowel(char c)
{
	c = tolower(c);
	if(c == 'a') return true;
	if(c == 'e') return true;
	if(c == 'i') return true;
	if(c == 'o') return true;
	if(c == 'u') return true;
	return false;
}

int main(){
	ios::sync_with_stdio(false);
	string s;
	cin >> s;
	int n = int(s.size());
	vector<int> v(n);
	FORN(i, 0, n) v[i] = is_vowel(s[i]) ? -1 : 2;

	vector<int> hope(n);
	hope[0] = v[0];
	FORN(i, 1, n) hope[i] = max(hope[i - 1] + v[i], v[i]);

	int maxsz = 0;
	int e = n - 1;
	while(e >= 0){
		if(hope[e] < 0){
			e--;
			continue;
		}

		int nexte = e - 1;

		int acc = v[e];
		int b = e - 1;
		while(true){
			while(b >= 0 and acc < 0) acc += v[b--];
			while(b >= 0 and acc + v[b] >= 0) acc += v[b--];
			if(b >= 0 and hope[b] >= 0) nexte = b;
			if(b < 0 or hope[b] < 0) break;
			acc += v[b--];
		}
		int sz = e - b;
		assert(b < 0 or hope[b] < 0);
		assert(acc >= 0);
		maxsz = max(maxsz, sz);

		e = nexte;
	}

	if(maxsz){
		int count = 0;
		vector<int> psum(n);
		psum[0] = v[0];
		FORN(i, 1, n) psum[i] = psum[i - 1] + v[i];
		FORN(b, 0, n - maxsz + 1){
			int e = b + maxsz - 1;
			int sum = psum[e] - (b ? psum[b - 1] : 0);
			if(sum >= 0) count++;
		}
		cout << maxsz << " " << count << endl;
	}else{
		cout << "No solution" << endl;
	}

}


#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>

using namespace std;

//#define NDEBUG
#if defined(NDEBUG)
#define DBG_CODE(cb...)
#else
#define DBG_CODE(cb...) cb
#endif
#define WRITE(x) DBG_CODE(cout << x << endl)
#define WATCH(x) DBG_CODE(cout << #x << "=" << x << endl)
#define FORN(i, a, b) for(typeof(b) i = (a); i < (b); i++)
#define ALL(x) x.begin(), x.end()
#define FOREACH(i, c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

bool is_vowel(char c)
{
	c = tolower(c);
	if(c == 'a') return true;
	if(c == 'e') return true;
	if(c == 'i') return true;
	if(c == 'o') return true;
	if(c == 'u') return true;
	return false;
}

int main(){
	ios::sync_with_stdio(false);
	string s;
	cin >> s;
	int n = int(s.size());
	vector<int> v(n);
	FORN(i, 0, n) v[i] = is_vowel(s[i]) ? -1 : 2;

	vector<int> hope(n);
	hope[0] = v[0];
	FORN(i, 1, n) hope[i] = max(hope[i - 1] + v[i], v[i]);

	int maxsz = 0;
	int e = n - 1;
	while(e >= 0){
		if(hope[e] < 0){
			e--;
			continue;
		}

		int acc = v[e];
		int b = e - 1;
		while(b >= 0){
			while(acc < 0) acc += v[b--];
			while(b >= 0 and acc + v[b] >= 0) acc += v[b--];
			if(b < 0 or hope[b] < 0) break;
			acc += v[b--];
		}
		int sz = e - b;
		maxsz = max(maxsz, sz);

		e = b;
	}

	if(maxsz){
		int count = 0;
		vector<int> psum(n);
		psum[0] = v[0];
		FORN(i, 1, n) psum[i] = psum[i - 1] + v[i];
		FORN(b, 0, n - maxsz + 1){
			int e = b + maxsz - 1;
			int sum = psum[e] - (b ? psum[b - 1] : 0);
			if(sum >= 0) count++;
		}
		cout << maxsz << " " << count << endl;
	}else{
		cout << "No solution" << endl;
	}

}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200020;
struct Tree
{
    int l,r,ls,rs,val;
};
int tot,maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int l,int r)
{
    if (l == r)
    {
        tot++; tree[tot].l = l; tree[tot].r = r; tree[tot].ls = tree[tot].rs = 0;
        tree[tot].val = 3 * sum[l] - 2 * l;
        return;
    }
    tot++;
    int tmp = tot,mid = (l + r) >> 1;
    tree[tmp].l = l;tree[tmp].r = r;
    tree[tmp].ls = tot + 1;
    build(l,mid);
    tree[tmp].rs = tot + 1;
    build(mid + 1,r);
    tree[tmp].val = min(tree[tree[tmp].ls].val,tree[tree[tmp].rs].val);
}
int fnd(int now,int a,int b,int x)
{
    int l = tree[now].l,r = tree[now].r;
    if (l == r)
    {
        if (tree[now].val > x) return -1;
        return l;
    }
    int mid = (l + r) >> 1;
    if (b <= mid)
    {
        if (tree[tree[now].ls].val > x) return -1;
        return fnd(tree[now].ls,a,b,x);
    }
    else if (a > mid)
    {
        if (tree[tree[now].rs].val > x) return -1;
        return fnd(tree[now].rs,a,b,x);
    }
    else
    {
        int tmp = -1;
        if (tree[tree[now].rs].val <= x) tmp = fnd(tree[now].rs,mid + 1,b,x);
        if (tmp != -1) return tmp;
        if (tree[tree[now].ls].val <= x) tmp = fnd(tree[now].ls,a,mid,x);
        return tmp;
    }
}
int main()
{
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
    tot = 0;
    build(1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = fnd(1,i,len,v);
        //cout<<i<<" "<<pos<<endl;
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    pf("%d %d\n",m,t);
}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200020;
struct Tree
{
    int l,r,val;
};
int maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int now,int l,int r)
{
    if (l == r)
    {
        tree[now].l = l; tree[now].r = r;
        tree[now].val = 3 * sum[l] - 2 * l;
        return;
    }
    int mid = (l + r) >> 1;
    tree[now].l = l;tree[now].r = r;
    build(now * 2,l,mid);
    build(now * 2 + 1,mid + 1,r);
    tree[now].val = min(tree[now * 2].val,tree[now * 2 + 1].val);
}
void fnd(int now,int a,int b)
{
    int l = tree[now].l,r = tree[now].r;
    if (a <= l && r <= b)
    {
        maxm = min(maxm,tree[now].val);
        return;
    }
    int mid = (l + r) >> 1;
    if (b <= mid) fnd(now * 2,a,b);
    else if (a > mid) fnd(now * 2 + 1,a,b);
    else
    {
        fnd(now * 2,a,mid);
        fnd(now * 2 + 1,mid + 1,b);
    }
}
inline int erfen(int l,int r,int x)
{
    int ans = -1;
    while (l <= r)
    {
        int mid = (l + r) >> 1;
        maxm = 1e9;
        fnd(1,mid,r);
        if (maxm <= x)
        {
            ans = mid;
            l = mid + 1;
        }
        else
        {
            maxm = 1e9;
            fnd(1,l,mid);
            if (maxm <= x)
            {
                ans = mid;
                r = mid - 1;
            } else return ans;
        }
    }
    return ans;
}
int main()
{
    //freopen("in.txt","r",stdin);
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
    build(1,1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = erfen(i,len,v);
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    else pf("%d %d\n",m,t);
}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200020;
struct Tree
{
    int l,r,ls,rs,val;
};
int tot,maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int l,int r)
{
    if (l == r)
    {
        tot++; tree[tot].l = l; tree[tot].r = r; tree[tot].ls = tree[tot].rs = 0;
        tree[tot].val = 3 * sum[l] - 2 * l;
        return;
    }
    tot++;
    int tmp = tot,mid = (l + r) >> 1;
    tree[tmp].l = l;tree[tmp].r = r;
    tree[tmp].ls = tot + 1;
    build(l,mid);
    tree[tmp].rs = tot + 1;
    build(mid + 1,r);
    tree[tmp].val = min(tree[tree[tmp].ls].val,tree[tree[tmp].rs].val);
}
int fnd(int now,int a,int b,int x)
{
    int l = tree[now].l,r = tree[now].r;
    if (l == r)
    {
        if (tree[now].val > x) return -1;
        return l;
    }
    int mid = (l + r) >> 1;
    if (b <= mid)
    {
        if (tree[tree[now].ls].val > x) return -1;
        return fnd(tree[now].ls,a,b,x);
    }
    else if (a > mid)
    {
        if (tree[tree[now].rs].val > x) return -1;
        return fnd(tree[now].rs,a,b,x);
    }
    else
    {
        int tmp;
        if (tree[tree[now].rs].val <= x) tmp = fnd(tree[now].rs,mid + 1,b,x);
        if (tmp != -1) return tmp;
        if (tree[tree[now].ls].val <= x) tmp = fnd(tree[now].ls,a,mid,x);
        return tmp;
    }
}
int main()
{
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
    tot = 0;
    build(1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = fnd(1,i,len,v);
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    pf("%d %d\n",m,t);
}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200020;
struct Tree
{
    int l,r,ls,rs,val;
};
int tot,maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int l,int r)
{
    if (l == r)
    {
        tot++; tree[tot].l = l; tree[tot].r = r; tree[tot].ls = tree[tot].rs = 0;
        tree[tot].val = 3 * sum[l] - 2 * l;
        return;
    }
    tot++;
    int tmp = tot,mid = (l + r) >> 1;
    tree[tmp].l = l;tree[tmp].r = r;
    tree[tmp].ls = tot + 1;
    build(l,mid);
    tree[tmp].rs = tot + 1;
    build(mid + 1,r);
    tree[tmp].val = min(tree[tree[tmp].ls].val,tree[tree[tmp].rs].val);
}
void fnd(int now,int a,int b)
{
    int l = tree[now].l,r = tree[now].r;
    if (a <= l && r <= b)
    {
        maxm = min(maxm,tree[now].val);
        return;
    }
    int mid = (l + r) >> 1;
    if (b <= mid) fnd(tree[now].ls,a,b);
    else if (a > mid) fnd(tree[now].rs,a,b);
    else
    {
        fnd(tree[now].ls,a,mid);
        fnd(tree[now].rs,mid + 1,b);
    }
}
inline int erfen(int l,int r,int x)
{
    int ans = -1;
   // cout<<l<<" "<<r<<endl;
    while (l <= r)
    {
        int mid = (l + r) >> 1;
        maxm = 1e9;
        fnd(1,mid,r);
        //cout<<mid<<" "<<r<<" "<<maxm<<endl;
        if (maxm <= x)
        {
            ans = mid;
            l = mid + 1;
        }
        else
        {
            maxm = 1e9;
            fnd(1,l,mid);
            if (maxm <= x)
            {
                ans = mid;
                r = mid - 1;
            } else return ans;
        }
    }
    return ans;
}
int main()
{
    //freopen("in.txt","r",stdin);
    //2 * (s[j] - s[i - 1]) <= j - i + 1;
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
   // for (int i = 1; i <= len; i++) cout<<3 * sum[i] - 2 * i<<endl;
    tot = 0;
    build(1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = erfen(i,len,v);
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    else pf("%d %d\n",m,t);
}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200020;
struct Tree
{
    int l,r,ls,rs,val;
};
int tot,maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int l,int r)
{
    if (l == r)
    {
        tot++; tree[tot].l = l; tree[tot].r = r; tree[tot].ls = tree[tot].rs = 0;
        tree[tot].val = 3 * sum[l] - 2 * l;
        return;
    }
    tot++;
    int tmp = tot,mid = (l + r) >> 1;
    tree[tmp].l = l;tree[tmp].r = r;
    tree[tmp].ls = tot + 1;
    build(l,mid);
    tree[tmp].rs = tot + 1;
    build(mid + 1,r);
    tree[tmp].val = min(tree[tree[tmp].ls].val,tree[tree[tmp].rs].val);
}
void fnd(int now,int a,int b)
{
    int l = tree[now].l,r = tree[now].r;
    if (a <= l && r <= b)
    {
        maxm = min(maxm,tree[now].val);
        return;
    }
    int mid = (l + r) >> 1;
    if (b <= mid) fnd(tree[now].ls,a,b);
    else if (a > mid) fnd(tree[now].rs,a,b);
    else
    {
        fnd(tree[now].ls,a,mid);
        fnd(tree[now].rs,mid + 1,b);
    }
}
inline int erfen(int l,int r,int x)
{
    int ans = -1;
   // cout<<l<<" "<<r<<endl;
    while (l <= r)
    {
        int mid = (l + r) >> 1;
        maxm = 1e9;
        fnd(1,mid,r);
        //cout<<mid<<" "<<r<<" "<<maxm<<endl;
        if (maxm <= x)
        {
            ans = mid;
            l = mid + 1;
        }
        else
        {
            maxm = 1e9;
            fnd(1,l,mid);
            if (maxm <= x)
            {
                ans = mid;
                r = mid - 1;
            } else return ans;
        }
    }
    return ans;
}
int main()
{
    //freopen("in.txt","r",stdin);
    //2 * (s[j] - s[i - 1]) <= j - i + 1;
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
   // for (int i = 1; i <= len; i++) cout<<3 * sum[i] - 2 * i<<endl;
    tot = 0;
    build(1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = erfen(i,len,v);
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    pf("%d %d\n",m,t);
}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200021;
struct Tree
{
    int l,r,val;
};
int maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int now,int l,int r)
{
    if (l == r)
    {
        tree[now].l = l; tree[now].r = r;
        tree[now].val = 3 * sum[l] - 2 * l;
        return;
    }
    int mid = (l + r) >> 1;
    tree[now].l = l;tree[now].r = r;
    build(now * 2,l,mid);
    build(now * 2 + 1,mid + 1,r);
    tree[now].val = min(tree[now * 2].val,tree[now * 2 + 1].val);
}
void fnd(int now,int a,int b)
{
    int l = tree[now].l,r = tree[now].r;
    if (a <= l && r <= b)
    {
        maxm = min(maxm,tree[now].val);
        return;
    }
    int mid = (l + r) >> 1;
    if (b <= mid) fnd(now * 2,a,b);
    else if (a > mid) fnd(now * 2 + 1,a,b);
    else
    {
        fnd(now * 2,a,mid);
        fnd(now * 2 + 1,mid + 1,b);
    }
}
inline int erfen(int l,int r,int x)
{
    int ans = -1;
    while (l <= r)
    {
        int mid = (l + r) >> 1;
        maxm = 1e9;
        fnd(1,mid,r);
        if (maxm <= x)
        {
            ans = mid;
            l = mid + 1;
        }
        else
        {
            maxm = 1e9;
            fnd(1,l,mid);
            if (maxm <= x)
            {
                ans = mid;
                r = mid - 1;
            } else return ans;
        }
    }
    return ans;
}
int main()
{
    //freopen("in.txt","r",stdin);
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
    build(1,1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = erfen(i,len,v);
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    else pf("%d %d\n",m,t);
}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200020;
struct Tree
{
    int l,r,ls,rs,val;
};
int tot,maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int l,int r)
{
    if (l == r)
    {
        tot++; tree[tot].l = l; tree[tot].r = r; tree[tot].ls = tree[tot].rs = 0;
        tree[tot].val = 3 * sum[l] - 2 * l;
        return;
    }
    tot++;
    int tmp = tot,mid = (l + r) >> 1;
    tree[tmp].l = l;tree[tmp].r = r;
    tree[tmp].ls = tot + 1;
    build(l,mid);
    tree[tmp].rs = tot + 1;
    build(mid + 1,r);
    tree[tmp].val = min(tree[tree[tmp].ls].val,tree[tree[tmp].rs].val);
}
int fnd(int now,int a,int b,int x)
{
    int l = tree[now].l,r = tree[now].r;
    if (l == r)
    {
        if (tree[now].val > x) return -1;
        return l;
    }
    int mid = (l + r) >> 1;
    if (b <= mid) return fnd(tree[now].ls,a,b,x);
    else if (a > mid) return fnd(tree[now].rs,a,b,x);
    else
    {
        int tmp = fnd(tree[now].rs,mid + 1,b,x);
        if (tmp != -1) return tmp;
        tmp = fnd(tree[now].ls,a,mid,x);
        return tmp;
    }
}
int main()
{
    //freopen("in.txt","r",stdin);
    //2 * (s[j] - s[i - 1]) <= j - i + 1;
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
   // for (int i = 1; i <= len; i++) cout<<3 * sum[i] - 2 * i<<endl;
    tot = 0;
    build(1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = fnd(1,i,len,v);
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    pf("%d %d\n",m,t);
}


#include<cstring>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define ll long long
#define pf printf
#define sf scanf
#define Fill(a,b) memset(a,b,sizeof(a))
const int N = 200020;
struct Tree
{
    int l,r,ls,rs,val;
};
int tot,maxm;
char s[N];
Tree tree[N * 4];
int sum[N];
inline int value(char c)
{
    if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 1;
    if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return 1;
    return 0;
}
void build(int l,int r)
{
    if (l == r)
    {
        tot++; tree[tot].l = l; tree[tot].r = r; tree[tot].ls = tree[tot].rs = 0;
        tree[tot].val = 3 * sum[l] - 2 * l;
        return;
    }
    tot++;
    int tmp = tot,mid = (l + r) >> 1;
    tree[tmp].l = l;tree[tmp].r = r;
    tree[tmp].ls = tot + 1;
    build(l,mid);
    tree[tmp].rs = tot + 1;
    build(mid + 1,r);
    tree[tmp].val = min(tree[tree[tmp].ls].val,tree[tree[tmp].rs].val);
}
void fnd(int now,int a,int b)
{
    int l = tree[now].l,r = tree[now].r;
    if (a <= l && r <= b)
    {
        maxm = min(maxm,tree[now].val);
        return;
    }
    int mid = (l + r) >> 1;
    if (b <= mid) fnd(tree[now].ls,a,b);
    else if (a > mid) fnd(tree[now].rs,a,b);
    else
    {
        fnd(tree[now].ls,a,mid);
        fnd(tree[now].rs,mid + 1,b);
    }
}
inline int erfen(int l,int r,int x)
{
    int ans = -1;
    while (l <= r)
    {
        int mid = (l + r) >> 1;
        maxm = 1e9;
        fnd(1,mid,r);
        if (maxm <= x)
        {
            ans = mid;
            l = mid + 1;
        }
        else
        {
            maxm = 1e9;
            fnd(1,l,mid);
            if (maxm <= x)
            {
                ans = mid;
                r = mid - 1;
            } else return ans;
        }
    }
    return ans;
}
int main()
{
    sf("%s",s); int len = strlen(s);
    for (int i = len - 1; i >= 0; i--) s[i + 1] = s[i];
    sum[0] = 0;
    for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + value(s[i]);
    tot = 0;
    build(1,len);
    int m = -1,t = 0;
    for (int i = 1; i <= len; i++)
    {
        int v = 3 * sum[i - 1] - 2 * (i - 1);
        int pos = erfen(i,len,v);
        if (pos != -1)
        {
            int l = pos - i + 1;
            if (l > m)
            {
                m = l; t = 1;
            } else if (l == m) t++;
        }
    }
    if (m == -1)
    {
        puts("No solution");
        return 0;
    }
    else pf("%d %d\n",m,t);
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 200005

using namespace std;

char s[maxn];
int  data[maxn],n,m,sum[maxn];

bool	pan(int k)
{
	for (int i = 0; i<m-k; i++)
	{
		if ( 2*(data[i+k+1] - data[i]-1-k) >= k )  return true;
	}
	return false;
}

int	solve(int k)
{
	int ret = -1;
	for (int i = 0; i<m-k; i++)
	{
		if ( 2*(data[i+k+1] - data[i]-1-k) >= k)
			ret = max(data[i+k+1]-data[i]-1,ret);
	}
	return ret;
}

int main()
{
	scanf("%s" , s );
	n = strlen(s);
	m = 0;
	data[m++] = -1;

	sum[0] = 0;
	int w = 0;
	for (int i = 0; i<strlen(s); i++)
	{
		sum[i+1] = sum[i];
		if ( s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u' ||
			 s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' )
		{
			data[m++] = i;
			sum[i+1]++;
		}
		else w++;
	}
	data[m++] = n;
	int g = 0 , h = m-2,t;
	h = min(w*2,h);
	while ( g <= h )
	{
		int mid = (g+h)>>1;
		if ( !pan(mid) ) h = mid-1;
		else
		{
			t = mid;
			g = mid + 1;
		}
	}
	int ans = solve(t);
	if ( ans <= 0 )
	{
		printf("No solution\n");
		return 0;
	}
	int cnt = 0;
	for (int i = 1; i<=n-ans+1; i++)
	{
		int v =  sum[i+ans-1] - sum[i-1];
		if ( 2*(ans-v) >= v  ) cnt ++;
	}
	printf("%d %d\n" , ans , cnt );

	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 200005

using namespace std;

char s[maxn];
int  data[maxn],n,m,sum[maxn];

bool	pan(int k)
{
	for (int i = 0; i<m-k; i++)
	{
		if ( 2*(data[i+k+1] - data[i]-1) >= k*3 )  return true;
	}
	return false;
}

int	solve(int k)
{
	int ret = -1;
	for (int i = 0; i<m-k; i++)
	{
		if ( 2*(data[i+k+1] - data[i]-1) >= k*3 )
			ret = max(data[i+k+1]-data[i]-1,ret);
	}
	return ret;
}

int main()
{
	scanf("%s" , s );
	n = strlen(s);
	m = 0;
	data[m++] = -1;

	sum[0] = 0;
	for (int i = 0; i<strlen(s); i++)
	{
		sum[i+1] = sum[i];
		if ( s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u' ||
			 s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' )
		{
			data[m++] = i;
			sum[i+1]++;
		}
	}
	data[m++] = n;
	int g = 0 , h = m,t;
	h = min(n/3*2,h);
	while ( g <= h )
	{
		int mid = (g+h)/2;
		if ( !pan(mid) ) h = mid-1;
		else
		{
			t = mid;
			g = mid + 1;
		}
	}
	int ans = solve(t);
	if ( ans <= 0 )
	{
		printf("No solution\n");
		return 0;
	}
	int cnt = 0;
	for (int i = 1; i<=n-ans+1; i++)
	{
		int v =  sum[i+ans-1] - sum[i-1];
		if ( 2*ans >= 3*v ) cnt ++;
	}
	printf("%d %d\n" , ans , cnt );

	return 0;
}


//By Lin
#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 200005

using namespace std;

char s[maxn];
int  data[maxn],n,m,sum[maxn];

bool	pan(int k)
{
	for (int i = 0; i<m-k; i++)
	{
		if ( 2*(data[i+k+1] - data[i]-1) >= k*3 )  return true;
	}
	return false;
}

int	solve(int k)
{
	int ret = -1;
	for (int i = 0; i<m-k; i++)
	{
		if ( 2*(data[i+k+1] - data[i]-1) >= k*3 )
			ret = max(data[i+k+1]-data[i]-1,ret);
	}
	return ret;
}

int main()
{
	scanf("%s" , s );
	n = strlen(s);
	m = 0;
	data[m++] = -1;

	sum[0] = 0;
	for (int i = 0; i<strlen(s); i++)
	{
		sum[i+1] = sum[i];
		if ( s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u' ||
			 s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' )
		{
			data[m++] = i;
			sum[i+1]++;
		}
	}
	data[m++] = n;
	int g = 0 , h = m,t;
	while ( g <= h )
	{
		int mid = (g+h)/2;
		if ( !pan(mid) ) h = mid-1;
		else
		{
			t = mid;
			g = mid + 1;
		}
	}
	int ans = solve(t);
	if ( ans <= 0 )
	{
		printf("No solution\n");
		return 0;
	}
	int cnt = 0;
	for (int i = 1; i<=n-ans+1; i++)
	{
		int v =  sum[i+ans-1] - sum[i-1];
		if ( 2*ans >= 3*v ) cnt ++;
	}
	printf("%d %d\n" , ans , cnt );

	return 0;
}