#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> cum[200005];
int conv(char c) {
  c = tolower(c);
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return -1;
  return 2;
}
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  for (int i = 1; i <= n; i++)
    cum[i] = make_pair((cum[i - 1].first + conv(s[i - 1])), (i));
  sort(cum, cum + n + 1);
  long long mxi = cum[n].second;
  long long mx = 0;
  for (int i = n - 1; i >= 0; i--) {
    mx = max(mx, mxi - cum[i].second);
    mxi = max(mxi, cum[i].second);
  }
  if (mx == 0) {
    cout << "No solution"
         << "\n";
    return 0;
  }
  cout << mx << " ";
  sort(cum, cum + n + 1, cmp);
  int ans = 0;
  for (int i = 1; i <= n - mx + 1; i++)
    if (cum[i + mx - 1].first - cum[i - 1].first >= 0) ans++;
  cout << ans << "\n";
  return 0;
}
