#include <bits/stdc++.h>
using namespace std;
char s[200100];
int p[200100];
int m[200100];
int main() {
  scanf("%s", &s);
  int n = strlen(s);
  int sum = 0;
  int last = -1;
  int res = 0;
  for (int i = (0); i < (n); ++i)
    if ((s[i] == 'a') || (s[i] == 'e') || (s[i] == 'i') || (s[i] == 'o') ||
        (s[i] == 'u') || (s[i] == 'A') || (s[i] == 'E') || (s[i] == 'I') ||
        (s[i] == 'O') || (s[i] == 'U'))
      p[i + 1] = p[i] - 1;
    else
      p[i + 1] = p[i] + 2;
  m[n] = p[n];
  for (int i = n - 1; i >= 0; --i)
    m[i] = ((m[i + 1] < p[i]) ? (p[i]) : (m[i + 1]));
  int res1 = 0, res2 = 0;
  for (int i = (0); i < (n); ++i) {
    int l = 1, r = n;
    int best = -1;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (m[mid] >= p[i]) {
        best = mid;
        l = mid + 1;
      } else
        r = mid - 1;
    }
    if (best != -1)
      if (best - i > res1) {
        res1 = best - i;
        res2 = 1;
      } else if (res1 == best - i)
        res2++;
  }
  if (res1 == 0)
    cout << "No solution" << endl;
  else
    cout << res1 << " " << res2 << endl;
  return 0;
}
