#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1000000007;
const int MAX_N = 2e5 + 1;
const int base = 37;
using namespace std;
inline string getStr() {
  char s[1000000];
  scanf("%s", s);
  return s;
}
int sum[MAX_N];
int Mx[MAX_N];
int main() {
  string s = " " + getStr();
  int sz = (int)s.size();
  for (int i = 1; i < sz; i++) {
    s[i] = tolower(s[i]);
    if (!i) {
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u')
        sum[i] = -1;
      else
        sum[i] = 2;
    } else {
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u')
        sum[i] = -1 + sum[i - 1];
      else
        sum[i] = sum[i - 1] + 2;
    }
  }
  Mx[sz - 1] = sum[sz - 1];
  for (int i = sz - 2; i >= 0; i--) Mx[i] = max(Mx[i + 1], sum[i]);
  int l, r, res;
  l = r = res = 0;
  for (; l < sz; l++) {
    r = max(r, l);
    while (r < sz - 1 && Mx[r + 1] >= sum[l]) r++;
    res = max(res, r - l);
    while (l < sz - 1 && Mx[r + 1] >= sum[r]) l++;
  }
  int cnt = 0;
  for (int i = 0; i + res < sz; i++) {
    if (sum[i + res] >= sum[i]) cnt++;
  }
  if (!res)
    cout << "No solution" << endl;
  else
    cout << res << " " << cnt << endl;
}
