#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
string s;
int b[N], sum[N];
char p[] = "aeiou";
bool check(char c) {
  for (int i = 0; i < 5; i++) {
    if (c == p[i] || c == p[i] - 32) {
      return true;
    }
  }
  return false;
}
int main() {
  cin >> s;
  int n = s.length();
  for (int i = 0; i < n; i++) {
    b[i + 1] = check(s[i]) ? -1 : 2;
  }
  partial_sum(b + 1, b + n + 1, b + 1);
  vector<pair<int, int> > v;
  for (int i = 1; i <= n; i++) {
    v.push_back(make_pair(b[i], i));
  }
  v.push_back(make_pair(0, 0));
  sort(v.begin(), v.end());
  deque<pair<int, int> > Q;
  int ret = 0, cnt = 0;
  for (int i = 0; i <= n; i++) {
    if (!Q.empty() && v[i].first - Q.front().first >= 0) {
      int tmp = v[i].second - Q.front().second;
      if (tmp > ret) {
        ret = tmp;
        cnt = 1;
      } else if (ret == tmp) {
        cnt++;
      }
    }
    while (!Q.empty() && v[i].second <= Q.back().second) {
      Q.pop_back();
    }
    Q.push_back(v[i]);
  }
  if (!ret) {
    printf("No solution\n");
  } else {
    printf("%d %d\n", ret, cnt);
  }
  return 0;
}
