#include <bits/stdc++.h>
using namespace std;
char s[200010] = {};
int u[200010] = {};
int h[200010] = {};
int p[200010] = {};
int mi[200010] = {};
int ans[200010] = {};
int n;
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) {
    if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u')
      u[i]--;
    else if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
             s[i] == 'U')
      u[i]--;
    else
      u[i] += 2;
  }
  for (int i = 1; i <= n; i++) p[i] = p[i - 1] + u[i];
  for (int i = n; i >= 1; i--) {
    h[i] = h[i + 1] + u[i];
    mi[i] = min(mi[i + 1], h[i + 1]);
  }
  int r = 0;
  for (int i = 0; i < n; i++) {
    while ((p[r + 1] - p[i] >= 0 || h[r + 1] - mi[r + 1] + p[r] - p[i] >= 0) &&
           r < n)
      r++;
    ans[r - i]++;
  }
  for (int i = n; i >= 1; i--) {
    if (ans[i]) {
      cout << i << " " << ans[i];
      return 0;
    }
  }
  cout << "No solution";
  return 0;
}
