#include <bits/stdc++.h>
using namespace std;
const int N = 200500;
int pref[N], mx[N];
pair<int, int> a[N];
int main() {
  string s;
  cin >> s;
  int n = s.size();
  for (int i = 0; i < n; i++) {
    s[i] = tolower(s[i]);
    if (s[i] == 'o' or s[i] == 'e' or s[i] == 'i' or s[i] == 'u' or s[i] == 'a')
      pref[i] = -1;
    else
      pref[i] = 2;
    if (i) pref[i] += pref[i - 1];
    a[i] = make_pair(pref[i], i);
  }
  sort(a, a + n);
  mx[n] = -1;
  for (int i = n - 1; i >= 0; i--) {
    mx[i] = max(mx[i + 1], a[i].second);
  }
  int bestLen = 0, occurencies = 0;
  int dec = 0;
  for (int i = 0; i < n; i++) {
    int ind = lower_bound(a, a + n, make_pair(dec, 0)) - a;
    int r = mx[ind];
    if (r - i + 1 > bestLen) {
      bestLen = r - i + 1;
      occurencies = 1;
    } else if (r - i + 1 == bestLen)
      occurencies++;
    dec = pref[i];
  }
  if (bestLen == 0)
    cout << "No solution\n";
  else
    cout << bestLen << " " << occurencies << endl;
  return 0;
}
