#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int ans[N], n;
int pos[N * 3];
char str[N];
bool isvowel(char c) {
  if (c >= 'A' && c <= 'Z') c = c - 'A' + 'a';
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
int main() {
  scanf(" %s", str);
  n = strlen(str);
  memset(pos, -1, sizeof(pos));
  int sum = 0;
  for (int i = (0); i < (n); i++) {
    sum += isvowel(str[i]) ? -1 : 2;
    if (~pos[n + sum])
      ans[i - pos[n + sum]]++;
    else
      pos[n + sum] = i;
    if (sum >= 0) ans[i + 1]++;
  }
  int res = n;
  while (res > 0 && !ans[res]) res--;
  if (res > 0)
    cout << res << " " << ans[res] << endl;
  else
    cout << "No solution" << endl;
  return 0;
}
