#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int cum[200005], prefixMin[200005];
bool isVowel(char ch) {
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    return true;
  if (ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')
    return true;
  return false;
}
bool check(int x, int n) {
  for (int i = 1; i <= n; i++) {
    if (i - x >= 0) {
      if (cum[i] >= prefixMin[i - x]) return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string str;
  int n, i, j, a = 0;
  cin >> str;
  n = (int)str.size();
  for (i = 0; i < n; i++) {
    if (isVowel(str[i]))
      a--;
    else
      a += 2;
    cum[i + 1] = a;
  }
  for (i = 1; i <= n; i++) {
    if (cum[i] < prefixMin[i - 1]) {
      prefixMin[i] = cum[i];
    } else
      prefixMin[i] = prefixMin[i - 1];
  }
  int lo = 1, hi = n, mid, indx = -1;
  while (lo <= hi) {
    mid = (lo + hi) >> 1;
    bool p = check(mid, n);
    if (p) {
      indx = mid;
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  if (indx == -1) {
    cout << "No solution" << endl;
    return 0;
  }
  cout << indx << ' ';
  int cnt = 0;
  for (i = 1; i <= n; i++) {
    if (i + indx - 1 <= n) {
      if (cum[i + indx - 1] - cum[i - 1] >= 0) cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}
