#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
int N;
int ps[MAXN];
int aux[MAXN];
char str[MAXN];
char vowel[255];
bool comp(int a, int b) { return a > b; }
int main(int argc, char *argv[]) {
  scanf("%s", str);
  N = strlen(str);
  vowel['a'] = vowel['e'] = vowel['o'] = vowel['u'] = vowel['i'] = 1;
  for (int i = 0, _i = N; i < _i; ++i) {
    ps[i] = (!i ? 0 : ps[i - 1]) + (vowel[tolower(str[i])] ? -1 : 2);
  }
  aux[N] = -1000000;
  for (int i = (N - 1), _i = (0); i >= _i; --i) {
    aux[i] = max(aux[i + 1], ps[i]);
  }
  int ans = 0;
  int cnt = 0;
  for (int i = 0; i < N; i++) {
    int it = upper_bound(aux, aux + N, !i ? 0 : ps[i - 1], comp) - 1 - aux;
    int q = it - i + 1;
    if (q > ans) {
      ans = q;
      cnt = 1;
    } else if (q == ans) {
      cnt++;
    }
  }
  if (!ans) {
    printf("No solution\n");
    return 0;
  }
  printf("%d %d\n", ans, cnt);
  return 0;
}
