#include <bits/stdc++.h>
using namespace std;
const int N = 6e5 + 5;
int n, sz, cnt, a[N], fen[N];
void add(int p, int x) {
  for (p += n + 1; p < N; p += p & -p) fen[p] = min(fen[p], x);
}
int get(int p) {
  int ans = n;
  for (p += n + 1; p; p -= p & -p) ans = min(ans, fen[p]);
  return ans;
}
int cost(char c) {
  for (auto x : {'a', 'e', 'i', 'o', 'u'})
    if (c == x || c + 'a' - 'A' == x) return -1;
  return 2;
}
int main() {
  string s;
  cin >> s;
  n = s.size();
  memset(fen, 63, sizeof fen);
  for (int i = 0; i < n; i++) {
    add(a[i], i);
    int j = i + 1 - get(a[i + 1] = a[i] + cost(s[i]));
    sz < j ? sz = j, cnt = 1 : cnt += (sz == j);
  }
  sz ? cout << sz << ' ' << cnt : cout << "No solution";
}
