#include <bits/stdc++.h>
#pragma GCC optimize "03"
using namespace std;
const long long int N = 2e5 + 5;
const long long int mod = 1e9 + 7;
const long long int inf = 1e9 + 9;
long long int a[N], t[4 * N];
void build(long long int nd, long long int s, long long int e) {
  if (s == e) {
    t[nd] = a[s];
    return;
  }
  long long int md = (s + e) >> 1;
  build(nd << 1, s, md);
  build(nd << 1 | 1, md + 1, e);
  t[nd] = min(t[nd << 1], t[nd << 1 | 1]);
}
long long int query(long long int nd, long long int s, long long int e,
                    long long int id) {
  if (s == e) return s;
  long long int md = (s + e) >> 1;
  if (t[nd << 1] <= a[id]) return query(nd << 1, s, md, id);
  return query(nd << 1 | 1, md + 1, e, id);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long int n = s.length();
  for (long long int i = 0; i < (long long int)s.length(); i++) {
    char p = s[i];
    if (p == 'A' || p == 'E' || p == 'I' || p == 'O' || p == 'U')
      a[i + 1] = -1;
    else if (p == 'a' || p == 'e' || p == 'i' || p == 'o' || p == 'u')
      a[i + 1] = -1;
    else
      a[i + 1] = 2;
    a[i + 1] += a[i];
  }
  build(1, 0, n);
  long long int mx = 0, c = 0;
  for (long long int i = 1; i <= n; i++) {
    long long int l = query(1, 0, n, i);
    if (i - l > mx) {
      mx = i - l;
      c = 1;
    } else if (i - l == mx)
      c++;
  }
  if (mx == 0)
    cout << "No solution";
  else
    cout << mx << " " << c << '\n';
  return 0;
}
