#include <bits/stdc++.h>
using namespace std;
char s[200010];
char ch[10] = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'};
int len;
int stac[200010];
int pp[200010];
int main() {
  scanf("%s", s);
  len = strlen(s);
  int p = 0;
  int ans1 = 0, ans2;
  int top = 0;
  stac[top++] = 0;
  pp[0] = 0;
  for (int i = 0; i < len; i++) {
    bool f = true;
    for (int j = 0; j < 10; j++)
      if (s[i] == ch[j]) {
        p++;
        f = false;
      }
    if (f) p -= 2;
    pp[i + 1] = p;
    int l = 0, r = top - 1;
    while (l < r) {
      int mid = (l + r) / 2;
      int x = stac[mid];
      if (pp[i + 1] - pp[x] <= 0)
        r = mid;
      else
        l = mid + 1;
    }
    if (pp[i + 1] - pp[stac[l]] <= 0) {
      if (i + 1 - stac[l] == ans1) ans2++;
      if (i + 1 - stac[l] > ans1) {
        ans1 = i + 1 - stac[l];
        ans2 = 1;
      }
    }
    if (p > pp[stac[top - 1]]) stac[top++] = i + 1;
  }
  if (ans1 == 0)
    printf("No solution\n");
  else
    printf("%d %d\n", ans1, ans2);
}
