#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  int cc = 0;
  while (cin >> a) {
    cc++;
    int sum = 0, data[200000] = {0};
    for (int i = 0; i < a.size(); i++) {
      if (a[i] == 'a' || a[i] == 'A' || a[i] == 'i' || a[i] == 'I' ||
          a[i] == 'u' || a[i] == 'U' || a[i] == 'e' || a[i] == 'E' ||
          a[i] == 'o' || a[i] == 'O') {
        sum++;
      }
      data[i] = sum;
    }
    int ans = 0, ct = 0;
    for (int i = 0; i < a.size(); i++) {
      int an = 0;
      for (int j = a.size() - 1; j >= i;) {
        if ((j - i + 1) < ans) break;
        int v = data[j], s = (j - i + 1);
        if (i != 0) v -= data[i - 1];
        s -= v;
        if (v <= s * 2) {
          an = j - i + 1;
          break;
        }
        j -= (v - s * 2);
      }
      if (an > ans) {
        ans = an;
        ct = 0;
      }
      if (an == ans) ct++;
    }
    if (ans == 0)
      cout << "No solution" << endl;
    else
      cout << ans << " " << ct << endl;
  }
}
