#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 9;
string s;
long long n, ans, cnt;
long long vov[N], ps[N], mx[4 * N];
vector<pair<long long, long long> > v;
void build(long long at, long long l, long long r) {
  if (r == l + 1) {
    mx[at] = v[l].second;
    return;
  }
  long long mid = (l + r) >> 1;
  build(at * 2, l, mid);
  build(at * 2 + 1, mid, r);
  mx[at] = (mx[at * 2] > mx[at * 2 + 1] ? mx[at * 2] : mx[at * 2 + 1]);
}
long long qry(long long at, long long l, long long r, long long L,
              long long R) {
  if (r <= l) return 0;
  if (l == L && r == R) return mx[at];
  long long mid = (L + R) >> 1;
  long long res = 0;
  if (l < mid)
    res = (res > qry(at * 2, l, min(r, mid), L, mid)
               ? res
               : qry(at * 2, l, min(r, mid), L, mid));
  if (r > mid)
    res = (res > qry(at * 2 + 1, (l > mid ? l : mid), r, mid, R)
               ? res
               : qry(at * 2 + 1, (l > mid ? l : mid), r, mid, R));
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  vov['a'] = vov['e'] = vov['i'] = vov['u'] = vov['o'] = vov['A'] = vov['E'] =
      vov['O'] = vov['U'] = vov['I'] = 1;
  cin >> s;
  n = s.size();
  long long sum = 0, ok = 0;
  for (long long i = 0; i < (n); i++) {
    if (vov[s[i]])
      sum--;
    else
      sum += 2, ok = 1;
    v.push_back({sum, i});
    ps[i] = sum;
  }
  if (!ok) {
    cout << "No solution";
    return 0;
  }
  sort(v.begin(), v.end());
  build(1, 0, n);
  for (long long i = 0; i < (n); i++) {
    long long fnd = -100000000;
    long long l =
        lower_bound(v.begin(), v.end(), make_pair(ps[i - 1] * bool(i), fnd)) -
        v.begin();
    long long res = qry(1, l, n, 0, n) - i + 1;
    if (res == ans) cnt++;
    if (res > ans) {
      cnt = 1;
      ans = res;
    }
  }
  cout << ans << ' ' << cnt << endl;
}
