#include <bits/stdc++.h>
using namespace std;
const int MAX = 200005;
int v[MAX], c[MAX], m;
vector<int> vec = {0}, val = {0};
bool vocal(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return true;
  if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') return true;
  return false;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  map<int, long long> mapa;
  cin >> s;
  int n = s.size();
  int ans = 0, cant = 0;
  m = 1;
  for (int i = 1; i < n + 1; i++) {
    v[i] = v[i - 1] + (vocal(s[i - 1]) ? 1 : 0);
    c[i] = c[i - 1] + (vocal(s[i - 1]) ? 0 : 2);
    int last = vec[m - 1];
    if (v[i] - c[i] > v[last] - c[last]) {
      vec.push_back(i);
      val.push_back(v[i] - c[i]);
      m++;
    }
    int j = lower_bound(val.begin(), val.end(), v[i] - c[i]) - val.begin();
    j = vec[j];
    if (i - j > ans) {
      ans = i - j;
      cant = 0;
    }
    if (i - j == ans) cant++;
  }
  if (ans == 0)
    cout << "No solution\n";
  else
    cout << ans << " " << cant << "\n";
}
