#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const double EPS = 1e-9;
const double PI = 3.1415926535897932384626433832795;
template <typename T>
T sqr(const T &x) {
  return x * x;
}
template <typename T>
string GetString(const T &val) {
  ostringstream sout;
  sout << val;
  return sout.str();
}
const int MAXN = 2 * 100005;
char s[MAXN];
int n;
int pref[MAXN];
int mas[MAXN];
bool IsVowel(char c) {
  static const char s[] = "aeiou";
  static const int SZ = 5;
  return find(s, s + SZ, c) != s + SZ;
}
void Init() {
  gets(s);
  n = strlen(s);
  for (int i = 0; i < (n); ++i) {
    s[i] = tolower(s[i]);
    pref[i] = IsVowel(s[i]);
    if (i) pref[i] += pref[i - 1];
  }
  for (int i = 0; i < (n); ++i) {
    mas[i] = i + 1;
  }
}
bool IsGood(int l, int r) {
  int vowel = pref[r];
  if (l) vowel -= pref[l - 1];
  int consonant = (r - l + 1) - vowel;
  return vowel <= 2 * consonant;
}
int Count(int len) {
  int res = 0;
  for (int i = 0; i < (n); ++i) {
    if (i + len > n) break;
    res += IsGood(i, i + len - 1);
  }
  return res;
}
bool Cmp(int tmp, int len) { return !Count(len); }
int main() {
  Init();
  if (count_if(s, s + n, IsVowel) == n) {
    cout << "No solution" << endl;
    return 0;
  }
  int len = *(upper_bound(mas, mas + n, -1, Cmp) - 1);
  const int DL = 1000;
  int res = 1;
  for (int i = max(1, len - DL); i <= min(n, len + DL); ++i) {
    if (Count(i)) res = i;
  }
  cout << res << ' ' << Count(res) << endl;
  return 0;
}
