#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5;
const int OFFSET = 2e5;
const int AL = 26;
const char v[] = {'a', 'e', 'i', 'o', 'u'};
int cost[AL];
int lst[MAXN + 1];
int pref[MAXN + 1];
string S;
int n, sum;
int ans, cnt;
void fast_io() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void prepare() {
  fill(cost, cost + AL, 2);
  for (int i = 0; i < 5; i++) {
    cost[v[i] - 'a'] = -1;
  }
}
int main() {
  fast_io();
  prepare();
  cin >> S;
  n = S.length();
  S = '$' + S;
  ans = -1;
  sum = cnt = 0;
  for (int i = 1; i <= n; i++) {
    char c = tolower(S[i]) - 'a';
    sum += cost[c];
    pref[i] = pref[i - 1] + (cost[c] != 2);
    if (sum >= 0)
      ans = max(ans, i);
    else if (lst[sum + OFFSET])
      ans = max(ans, i - lst[sum + OFFSET]);
    if (sum < 0 and !lst[sum + OFFSET]) lst[sum + OFFSET] = i;
  }
  if (ans ^ -1) {
    for (int l = 1; l + ans - 1 <= n; l++) {
      int r = l + ans - 1;
      int vow = pref[r] - pref[l - 1];
      int con = r - l + 1 - vow;
      if (vow <= (con << 1)) ++cnt;
    }
  }
  if (ans ^ -1)
    cout << ans << ' ' << cnt << '\n';
  else
    cout << "No solution" << '\n';
  return 0;
}
