#include <bits/stdc++.h>
using namespace std;
const int N = 600041, o = 200001;
int s[N];
void add(int p, int w) {
  p += o;
  for (int i = p; i < N; i += ((i) & -(i)))
    if (w < s[i]) s[i] = w;
}
int que(int p) {
  p += o;
  int ans = 0x3f3f3f3f;
  for (int i = p; i; i -= ((i) & -(i)))
    if (s[i] < ans) ans = s[i];
  return ans;
}
char t[N >> 1];
int sum[N >> 1];
int main() {
  memset(s, 0x3f, sizeof(s));
  scanf("%s", t + 1);
  int n = strlen(t + 1);
  add(0, 0);
  s[0] = 0;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    t[i] = tolower(t[i]);
    if (t[i] == 'a' || t[i] == 'e' || t[i] == 'i' || t[i] == 'o' || t[i] == 'u')
      sum[i] = -1;
    else
      sum[i] = 2;
    sum[i] += sum[i - 1];
    ans = max(ans, i - que(sum[i]));
    add(sum[i], i);
  }
  if (ans == 0)
    puts("No solution");
  else {
    int c = 0;
    for (int i = ans; i <= n; i++)
      if (sum[i] - sum[i - ans] >= 0) ++c;
    printf("%d %d\n", ans, c);
  }
}
