#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using ll = long long;
const int INF = 1e9;
const string VOWELS = "aeiou";
bool isVowel(char c) { return VOWELS.find(tolower(c)) != string::npos; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  int n = int((s).size());
  vi v(n);
  for (int i = int(0); i < int(n); i++) v[i] = isVowel(s[i]) ? -1 : 2;
  vector<pii> pref(n + 1);
  for (int i = int(1); i < int(n + 1); i++)
    pref[i] = {pref[i - 1].first + v[i - 1], i};
  sort(pref.begin(), pref.end());
  int mnind = INF, mxlen = 0, rep = 0;
  for (auto [sum, ind] : pref) {
    if (mnind != INF) {
      int len = ind - mnind;
      if (len > mxlen)
        mxlen = len, rep = 1;
      else if (len == mxlen)
        rep++;
    }
    mnind = min(mnind, ind);
  }
  if (mxlen == 0)
    cout << "No solution" << '\n';
  else
    cout << mxlen << ' ' << rep << '\n';
  return 0;
}
