#include <bits/stdc++.h>
struct duilie {
  int w, v;
} q[200010];
int sum[200010], a[200010];
int n, ha[500];
int ans, anss;
char s[200010];
void pre() {
  ha['a'] = ha['A'] = 1;
  ha['e'] = ha['E'] = 1;
  ha['i'] = ha['I'] = 1;
  ha['o'] = ha['O'] = 1;
  ha['u'] = ha['U'] = 1;
}
void solve() {
  int i, last;
  int l, r, mid;
  sum[0] = 0;
  for (i = 1; i <= n; i++) sum[i] = sum[i - 1] + a[i];
  ans = anss = 0;
  q[0].w = -1;
  q[0].v = 1000000;
  last = 1;
  q[last].w = 0;
  q[last].v = 0;
  for (i = 1; i <= n; i++) {
    if (sum[i] < q[last].v) {
      last++;
      q[last].v = sum[i];
      q[last].w = i;
    }
    l = 0;
    r = last;
    while (l < r - 1) {
      mid = (l + r) / 2;
      if (sum[i] - q[mid].v >= 0)
        r = mid;
      else
        l = mid;
    }
    if (ans < i - q[r].w) ans = i - q[r].w;
  }
  if (ans == 0) {
    printf("No solution\n");
    return;
  }
  for (i = ans; i <= n; i++)
    if (sum[i] - sum[i - ans] >= 0) anss++;
  printf("%d %d\n", ans, anss);
}
int main() {
  int i;
  pre();
  scanf("%s", s);
  n = strlen(s);
  for (i = 1; i <= n; i++)
    if (ha[s[i - 1]])
      a[i] = -1;
    else
      a[i] = 2;
  solve();
  return 0;
}
