#include <bits/stdc++.h>
using namespace std;
const int maxn = 3 * 100000;
int arr[maxn], dp[maxn];
int bs(int l, int r, int n) {
  if (l == r) return l;
  int mid = (l + r) / 2;
  if (dp[mid] <= n) return bs(l, mid, n);
  return bs(mid + 1, r, n);
}
int main() {
  string a;
  cin >> a;
  int n = a.length();
  arr[0] = 0;
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i - 1] == 'a' || a[i - 1] == 'e' || a[i - 1] == 'i' ||
        a[i - 1] == 'o' || a[i - 1] == 'u' || a[i - 1] == 'A' ||
        a[i - 1] == 'E' || a[i - 1] == 'I' || a[i - 1] == 'O' ||
        a[i - 1] == 'U')
      arr[i] = arr[i - 1] - 1;
    else
      arr[i] = arr[i - 1] + 2;
    dp[i] = min(dp[i - 1], arr[i]);
  }
  int mxl = 0;
  for (int i = 1; i <= n; i++) mxl = max(i - bs(0, i, arr[i]), mxl);
  if (mxl) {
    cout << mxl << ' ';
    int ans = 0;
    for (int i = 0; i <= n - mxl; i++)
      if (arr[i] <= arr[i + mxl]) ans++;
    cout << ans << endl;
  } else
    cout << "No solution" << endl;
}
