#include <bits/stdc++.h>
using namespace std;
int qtd[200007];
int vogal(char ch) {
  return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' ||
         ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U';
}
map<int, int> prim;
int main() {
  string s;
  cin >> s;
  int resp = 0;
  int qtdr = 0;
  for (int i = 1; i <= s.length(); i++) {
    qtd[i] = qtd[i - 1];
    qtd[i] += vogal(s[i - 1]) ? -1 : 2;
    if (qtd[i] >= 0)
      resp = i;
    else {
      if (!prim.count(qtd[i])) prim[qtd[i]] = i;
      resp = max(resp, i - prim[qtd[i]]);
    }
  }
  if (resp == 0) {
    cout << "No solution\n";
    return 0;
  }
  for (int i = resp; i <= s.length(); i++) {
    if (qtd[i - resp] <= qtd[i]) qtdr++;
  }
  cout << resp << " " << qtdr << '\n';
  return 0;
}
