#include <bits/stdc++.h>
using namespace std;
int tree[1000000];
char s[500000];
char change(char x) {
  if (x >= 'A' && x <= 'Z') return x - 'A' + 'a';
  return x;
}
bool ok(char x) {
  if (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u') return true;
  return false;
}
int top;
void update(int index, int x) {
  while (index <= top) {
    if (tree[index] > x) tree[index] = x;
    index += (-index) & index;
  }
}
int query(int index) {
  int sum = 1000000;
  while (index > 0) {
    if (tree[index] < sum) sum = tree[index];
    index -= (-index) & index;
  }
  return sum;
}
int sum[500000];
int main(int argc, char *argv[]) {
  while (scanf("%s", s) != EOF) {
    int len = strlen(s);
    top = len * 3 + 1;
    sum[0] = len + 1;
    for (int i = 0; i <= top; i++) tree[i] = 1000000;
    for (int i = 0; i < len; i++) {
      if (ok(change(s[i])))
        sum[i + 1] = sum[i] - 1;
      else
        sum[i + 1] = sum[i] + 2;
    }
    update(sum[0], 0);
    int ans = -1, tt = 0;
    for (int i = 1; i <= len; i++) {
      int tmp = query(sum[i]);
      update(sum[i], i);
      if (tmp != 1000000) {
        if (ans == -1) {
          ans = i - tmp;
          tt = 1;
        } else if (ans < i - tmp) {
          ans = i - tmp;
          tt = 1;
        } else if (ans == i - tmp) {
          tt++;
        }
      }
    }
    if (ans < 0)
      printf("No solution\n");
    else
      printf("%d %d\n", ans, tt);
  }
  return 0;
}
