#include <bits/stdc++.h>
int i, j, k, m, n;
int main() {
  char *s = new char[200001];
  int *g = new int[200001];
  fscanf(stdin, "%s", s);
  n = strlen(s);
  g[0] = 0;
  for (i = (0); i < (n); i++) {
    g[i + 1] = g[i];
    switch (s[i]) {
      case 'a':
      case 'e':
      case 'i':
      case 'o':
      case 'u':
      case 'A':
      case 'E':
      case 'I':
      case 'O':
      case 'U':
        g[i + 1]++;
        break;
      default:
        g[i + 1] -= 2;
        break;
    }
  }
  m = -1;
  k = 0;
  int *mp = new int[400001];
  for (i = (0); i <= (n); i++) {
    if (g[i] > m) {
      for (j = (m + 1); j < (g[i]); j++) mp[j] = mp[m];
      mp[g[i]] = i;
      m = g[i];
    } else {
      j = g[i] < 0 ? i : i - mp[g[i]];
      if (j > k) k = j;
    }
  }
  if (k == 0) {
    printf("No solution\n");
    return 0;
  }
  m = 0;
  for (i = 0; i + k <= n; i++)
    if (g[i] >= g[i + k]) m++;
  printf("%d %d\n", k, m);
  return 0;
}
