#include <bits/stdc++.h>
using namespace std;
const int MAX = 200005;
char s[MAX];
pair<int, int> f[MAX];
int tree[MAX], n;
void update(int pos, int val) {
  for (; pos <= n; pos += pos & -pos) tree[pos] = min(tree[pos], val);
}
int query(int pos) {
  int r = MAX;
  for (; pos; pos -= pos & -pos) r = min(tree[pos], r);
  return r;
}
int main() {
  int r = 0, can = 0;
  scanf("%s", s);
  n = strlen(s);
  f[0] = pair<int, int>(0, 0);
  for (int i = 0; i < n + 1; i++) {
    f[i + 1].first =
        f[i].first + ((s[i] == 'a' || s[i] == 'A' || s[i] == 'e' ||
                       s[i] == 'E' || s[i] == 'o' || s[i] == 'O' ||
                       s[i] == 'i' || s[i] == 'I' || s[i] == 'u' || s[i] == 'U')
                          ? -1
                          : 2);
    f[i + 1].second = i + 1;
    tree[i] = MAX;
  }
  sort(f, f + n + 1);
  for (int i = 0; i < n + 1; i++) {
    int pos = query(i);
    if (f[i].second - pos >= 0) {
      if (f[i].second - pos > r) {
        r = f[i].second - pos;
        can = 1;
      } else if (f[i].second - pos == r)
        can++;
    }
    update(i + 1, f[i].second);
  }
  if (can)
    printf("%d %d\n", r, can);
  else
    printf("No solution\n");
  return 0;
}
