#include <bits/stdc++.h>
int a[200005], tree[3200005], n, ans = 0, num = 0;
char s[200005];
inline int min(int a, int b) { return a < b ? a : b; }
void modify(int t, int l, int r, int x, int v) {
  if (l == r) {
    tree[t] = min(v, tree[t]);
    return;
  }
  int mid = (l + r) / 2;
  if (x <= mid)
    modify(t * 2, l, mid, x, v);
  else
    modify(t * 2 + 1, mid + 1, r, x, v);
  tree[t] = min(tree[t * 2], tree[t * 2 + 1]);
}
int query(int t, int l, int r, int ll, int rr) {
  if (l == ll && r == rr) return tree[t];
  int mid = (l + r) / 2;
  if (rr <= mid)
    return query(t * 2, l, mid, ll, rr);
  else if (ll > mid)
    return query(t * 2 + 1, mid + 1, r, ll, rr);
  else {
    int L = query(t * 2, l, mid, ll, mid),
        R = query(t * 2 + 1, mid + 1, r, mid + 1, rr);
    return min(L, R);
  }
}
int main() {
  gets(s);
  n = strlen(s);
  memset(a, 0, sizeof(a));
  for (int i = 0; i < n; i++) {
    if (s[i] >= 'A' && s[i] <= 'Z') s[i] += 32;
    if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u')
      a[i] = 1;
  }
  for (int i = n; i; i--) a[i] = a[i - 1];
  for (int i = 2; i <= n; i++) a[i] += a[i - 1];
  memset(tree, 6, sizeof(tree));
  modify(1, 1, 4 * n, 2 * n, 0);
  for (int i = 1; i <= n; i++) {
    int b = i - a[i];
    int x = query(1, 1, 4 * n, 1, 2 * b - a[i] + 2 * n);
    if (i - x > ans)
      ans = i - x, num = 1;
    else if (i - x == ans)
      num++;
    modify(1, 1, 4 * n, 2 * b - a[i] + 2 * n, i);
  }
  if (!ans)
    printf("No solution\n");
  else
    printf("%d %d\n", ans, num);
  return 0;
}
