#include <bits/stdc++.h>
using namespace std;
long funcion(char a) {
  long ans = 2;
  if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u') ans = -1;
  if (a == 'A' || a == 'E' || a == 'I' || a == 'O' || a == 'U') ans = -1;
  return ans;
}
int main() {
  string pal;
  cin >> pal;
  long suma[200005], cont[200005];
  memset(cont, 0, sizeof(cont));
  suma[0] = 0;
  for (long i = 0; i < pal.size(); i++) {
    suma[i + 1] = suma[i] + funcion(pal[i]);
  }
  long f[200005];
  f[pal.size()] = suma[pal.size()];
  for (long i = pal.size() - 1; i >= 0; i--) f[i] = max(suma[i], f[i + 1]);
  long indi = 0, indj = 0, ans = 0;
  while (indi <= pal.size()) {
    while (indj < pal.size() && f[indj + 1] >= suma[indi]) {
      indj++;
    }
    if (indj - indi >= ans && f[indj] >= suma[indi]) {
      ans = indj - indi;
      cont[ans]++;
    }
    indi++;
  }
  if (ans != 0)
    cout << ans << " " << cont[ans] << endl;
  else
    cout << "No solution\n";
  return 0;
}
