#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000039;
const int maxn = 200005;
bool is_vowel(char c) {
  return (c == 'a' || c == 'A' || c == 'e' || c == 'E' || c == 'i' ||
          c == 'I' || c == 'o' || c == 'O' || c == 'u' || c == 'U');
}
int n;
char s[maxn];
int pref[maxn], prefmin[maxn];
void precalc() {
  prefmin[0] = inf;
  for (int i = 0; i < n; ++i) {
    pref[i + 1] = pref[i];
    if (is_vowel(s[i]))
      --pref[i + 1];
    else
      pref[i + 1] += 2;
    prefmin[i + 1] = min(prefmin[i], pref[i + 1]);
  }
}
int count(int len) {
  int res = 0;
  for (int i = len; i <= n; ++i) res += bool(pref[i] - pref[i - len] >= 0);
  return res;
}
int32_t main() {
  scanf("%s", s);
  n = strlen(s);
  precalc();
  if (count(1) > 0) {
    int mx = 1;
    for (int r = 1; r <= n; ++r) {
      if (pref[r] >= 0)
        mx = r;
      else {
        int left = 1, right = r;
        while (right - left > 1) {
          int m = (left + right) / 2;
          if (prefmin[m] <= pref[r])
            right = m;
          else
            left = m;
        }
        if (prefmin[left] <= pref[r])
          mx = max(mx, r - left);
        else
          mx = max(mx, r - right);
      }
    }
    printf("%d %d\n", mx, count(mx));
  } else
    printf("No solution\n");
}
