#include <bits/stdc++.h>
using namespace std;
char inp[200010];
int sz, suf[200010], ans[200010], pref[200010];
bool isVowel(char c) {
  if (c == 'a' or c == 'e' or c == 'i' or c == 'o' or c == 'u') return true;
  return false;
}
int main() {
  scanf("%s", inp);
  ;
  sz = strlen(inp);
  for (int i = 0; i < sz; i++) inp[i] = tolower(inp[i]);
  if (isVowel(inp[0]))
    pref[0] = -1;
  else
    pref[0] = 2;
  for (int i = 1; i < sz; i++) {
    if (isVowel(inp[i]))
      pref[i]--;
    else
      pref[i] += 2;
    pref[i] += pref[i - 1];
  }
  for (int i = sz - 1; i >= 0; i--) {
    suf[i] = pref[i];
    if (i + 1 < sz) suf[i] = max(suf[i], suf[i + 1]);
  }
  int l, r, m;
  for (int i = 0; i < sz; i++) {
    l = 1, r = sz - i;
    int minus = 0;
    if (i > 0) minus = pref[i - 1];
    int tam = 0;
    while (l <= r) {
      m = (l + r) >> 1;
      if (suf[i + m - 1] - minus >= 0)
        tam = m, l = m + 1;
      else
        r = m - 1;
    }
    ans[tam]++;
  }
  for (int i = sz; i >= 1; i--) {
    if (ans[i] > 0) {
      printf("%d %d\n", i, ans[i]);
      return 0;
    }
  }
  printf("No solution\n");
  return 0;
}
