#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
char c[200010];
int n;
int a[N];
int dp[N];
int s[N];
void solve() {
  dp[0] = 0;
  for (int i = 1; i < n + 1; ++i) {
    dp[i] = a[i] + dp[i - 1];
  }
  int ans = 0;
  int top = 0;
  for (int i = 1; i < n + 1; ++i) {
    if (top == 0 || dp[i] < dp[s[top - 1]]) {
      s[top++] = i;
    }
    if (dp[i] >= 0) {
      ans = max(ans, i);
      continue;
    }
    int l = 0, h = top - 1, m;
    while (l <= h) {
      m = (l + h) >> 1;
      if (dp[i] - dp[s[m]] >= 0) {
        ans = max(ans, i - s[m]);
        h = m - 1;
      } else {
        l = m + 1;
      }
    }
  }
  if (ans == 0) {
    puts("No solution");
    return;
  }
  int tot = 0;
  for (int i = 1; i <= n + 1 - ans; ++i) {
    if (dp[i + ans - 1] - dp[i - 1] >= 0) ++tot;
  }
  printf("%d %d\n", ans, tot);
}
int main() {
  scanf("%s", c);
  n = strlen(c);
  for (int i = 0; i < n; ++i) {
    if (c[i] == 'A' || c[i] == 'E' || c[i] == 'I' || c[i] == 'O' ||
        c[i] == 'U' || c[i] == 'a' || c[i] == 'e' || c[i] == 'i' ||
        c[i] == 'o' || c[i] == 'u') {
      a[i + 1] = -1;
    } else
      a[i + 1] = 2;
  }
  solve();
  return 0;
}
