#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 77;
int n, a[N];
pair<int, int> A;
char S[N];
map<char, int> CHK = {{'a', 1}, {'A', 1}, {'e', 1}, {'E', 1}, {'i', 1},
                      {'I', 1}, {'o', 1}, {'O', 1}, {'u', 1}, {'U', 1}};
int Mn[N << 2];
int lz[N << 2];
inline void Shift(int l, int r, int id) {
  int x = lz[id];
  lz[id] = 0;
  Mn[id] += x;
  if (r - l > 1) lz[id << 1] += x, lz[id << 1 ^ 1] += x;
}
void Add(int ql, int qr, int x, int l = 1, int r = n + 1, int id = 1) {
  Shift(l, r, id);
  if (qr <= l || r <= ql) return;
  if (ql <= l && r <= qr) {
    lz[id] += x;
    Shift(l, r, id);
    return;
  }
  int mid = ((l + r) >> 1);
  Add(ql, qr, x, l, mid, id << 1);
  Add(ql, qr, x, mid, r, id << 1 ^ 1);
  Mn[id] = min(Mn[id << 1], Mn[id << 1 ^ 1]);
}
int Get(int ql, int qr, int l = 1, int r = n + 1, int id = 1) {
  Shift(l, r, id);
  if (qr <= l || r <= ql) return N;
  if (ql <= l && r <= qr) return Mn[id];
  int mid = ((l + r) >> 1);
  return min(Get(ql, qr, l, mid, id << 1), Get(ql, qr, mid, r, id << 1 ^ 1));
}
int main() {
  scanf("%s", S + 1);
  n = strlen(S + 1);
  for (int i = 1; i <= n; ++i) {
    a[i] = CHK[S[i]];
    if (a[i] == 0) a[i] = -2;
  }
  for (int i = 1; i <= n; ++i) {
    Add(1, i + 1, a[i]);
    int ri = i + 1, le = 0;
    while (ri - le > 1) {
      int mid = ((le + ri) >> 1);
      if (Get(1, mid + 1) <= 0)
        ri = mid;
      else
        le = mid;
    }
    if (i - ri + 1 > A.first) A = make_pair(i - ri + 1, 0);
    if (i - ri + 1 == A.first) ++A.second;
  }
  if (A.first == 0) return !printf("No solution\n");
  printf("%d %d\n", A.first, A.second);
  return 0;
}
