#include <bits/stdc++.h>
using namespace std;
const int MAX = 8 * 100000 + 100;
const int base = MAX / 2;
vector<int> memo[MAX];
int v[256];
int main() {
  string str;
  cin >> str;
  v['a'] = v['A'] = 1;
  v['e'] = v['E'] = 1;
  v['i'] = v['I'] = 1;
  v['o'] = v['O'] = 1;
  v['u'] = v['U'] = 1;
  int tmp = 0;
  memo[base].push_back(0);
  for (int i = 0; i < (int)(str.size()); i++) {
    if (v[str[i]] == 1)
      tmp -= 1;
    else
      tmp += 2;
    memo[tmp + base].push_back(i + 1);
  }
  for (int i = 0; i < base + tmp; i++) memo[i].push_back(str.size());
  pair<int, int> ans = make_pair(-1, 0);
  for (int i = 0; i < (int)(MAX); i++)
    if (memo[i].size() > 1) {
      int cnt = memo[i][memo[i].size() - 1] - memo[i][0];
      if (ans.first < cnt) {
        ans = make_pair(cnt, 1);
      } else if (ans.first == cnt) {
        ans.second++;
      }
    }
  if (ans.first != -1) {
    printf("%d %d\n", ans.first, ans.second);
  } else {
    puts("No solution");
  }
  return 0;
}
