#include <bits/stdc++.h>
using namespace std;
const int N = 200100;
int n;
int p[N];
int s[N];
char data[N];
int main() {
  while (scanf("%s", data) != EOF) {
    int i, j;
    memset(p, 0, sizeof(p));
    n = strlen(data);
    for (i = 0; i < n; i++) data[i] = tolower(data[i]);
    for (i = 1; i <= n; i++) {
      int t = (data[i - 1] == 'a' || data[i - 1] == 'e' || data[i - 1] == 'i' ||
               data[i - 1] == 'o' || data[i - 1] == 'u')
                  ? -1
                  : 2;
      p[i] = p[i - 1] + t;
    }
    s[n] = p[n];
    for (i = n - 1; i >= 1; i--) s[i] = max(p[i], s[i + 1]);
    j = 1;
    int maxl = 0;
    for (i = 1; i <= n; i++)
      for (; j <= n; j++) {
        if (s[j] >= p[i - 1])
          maxl = max(maxl, j - i + 1);
        else
          break;
      }
    int cnt = 0;
    for (i = 1; i <= n - maxl + 1; i++) {
      if (p[i + maxl - 1] - p[i - 1] >= 0) cnt++;
    }
    if (maxl == 0)
      printf("No solution\n");
    else
      printf("%d %d\n", maxl, cnt);
  }
}
