#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} debug;
template <typename T1, typename T2>
inline ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
inline ostream& operator<<(ostream& os, const vector<T>& v) {
  bool first = true;
  os << "[";
  for (typename vector<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii) {
    if (!first) os << ", ";
    os << *ii;
    first = false;
  }
  return os << "]";
}
const int NN = (1 << 18);
int seg[NN], dp[NN];
int od[NN], ans[NN];
bool vowel(char ch) {
  ch = tolower(ch);
  if (ch == 'a' or ch == 'e' or ch == 'i' or ch == 'o' or ch == 'u')
    return true;
  return false;
}
bool cmp(int x, int y) {
  if (dp[x] == dp[y]) return (x < y);
  return (dp[x] < dp[y]);
}
void update(int i, int v) {
  for (i += 5; i < NN; i += i & -i) seg[i] += v;
}
int findcum(int cum) {
  int id = 0, bitmask = NN >> 1;
  while (bitmask != 0) {
    int tid = id + bitmask;
    if (seg[tid] < cum) cum -= seg[tid], id = tid;
    bitmask >>= 1;
  }
  return id + 1 - 5;
}
void solve() {
  string msg;
  cin >> msg;
  int n = (int)msg.size();
  dp[0] = od[0] = 0;
  for (int i = 1; i <= n; ++i)
    dp[i] = dp[i - 1] + ((vowel(msg[i - 1])) ? -1 : 2), od[i] = i;
  sort(od, od + n + 1, cmp);
  int res = numeric_limits<int>::min();
  for (int i = 0; i <= n; ++i) {
    update(od[i], 1);
    int id = findcum(1);
    if (id < od[i]) res = max(res, od[i] - id), ++ans[od[i] - id];
  }
  if (res <= 0)
    puts("No solution");
  else
    cout << res << " " << ans[res] << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  solve();
  return 0;
}
