#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int mx[3000000];
int parts[3000000];
int main() {
  char cc[10] = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'};
  string s;
  cin >> s;
  int x = 0;
  int y = 0;
  for (long long i = 0; i < s.size(); i++) {
    bool ok = false;
    for (long long j = 0; j < 10; j++)
      if (s[i] == cc[j]) ok = true;
    if (ok)
      ++x;
    else
      ++y;
    parts[i] = 2 * y - x;
  }
  int n = s.size();
  mx[0] = parts[0];
  for (long long i = 1; i <= n - 1; i++) mx[i] = min(mx[i - 1], parts[i]);
  int Max = -100;
  for (long long last = 0; last < n; last++) {
    int l = 0;
    int r = last - 1;
    if (parts[last] >= 0) {
      r = -1;
      goto m1;
    }
    if (last == 0 && parts[0] < 0) continue;
    if (parts[last] - mx[last - 1] < 0) continue;
    while (1 == 1) {
      if (l + 4 >= r) {
        for (long long ii = l; ii <= r; ii++)
          if (parts[last] - mx[ii] >= 0) {
            r = ii;
            goto m1;
          }
      }
      int m = (l + r) / 2;
      if (parts[last] - mx[m] >= 0)
        r = m;
      else
        l = m;
    }
  m1:
    Max = max(Max, (int)last - r);
  }
  if (Max < 0) {
    cout << "No solution\n";
    return 0;
  }
  int cnt = 0;
  if (parts[Max - 1] >= 0) cnt = 1;
  for (long long i = Max; i <= n - 1; i++)
    if (parts[i] - mx[i - Max] >= 0) ++cnt;
  cout << Max << " " << cnt << endl;
}
