#include <bits/stdc++.h>
using namespace std;
int t[601000], v[201000], n, ans, ans2, cc, tt, tot;
char ss[201000];
void insert(int x, int y) {
  while (x <= tot) {
    t[x] = min(t[x], y);
    x = x + (x & (-x));
  }
}
int ask(int x) {
  int tmp = n;
  while (x > 0) {
    tmp = min(t[x], tmp);
    x = x - (x & (-x));
  }
  return tmp;
}
int main() {
  memset(t, 127, sizeof(t));
  cin >> ss;
  n = strlen(ss);
  tot = n * 3 + 1;
  for (int i = 0; i < n; i++)
    if (ss[i] == 'a' || ss[i] == 'e' || ss[i] == 'i' || ss[i] == 'o' ||
        ss[i] == 'u' || ss[i] == 'A' || ss[i] == 'E' || ss[i] == 'I' ||
        ss[i] == 'O' || ss[i] == 'U')
      v[i + 1] = v[i] + 1;
    else
      v[i + 1] = v[i];
  insert(1 + n, 0);
  for (int i = 1; i <= n; i++) {
    cc = i - v[i];
    tt = ask(cc * 2 - v[i] + n + 1);
    insert(cc + cc - v[i] + n + 1, i);
    if (i - tt == ans) ans2++;
    if (i - tt > ans) {
      ans = i - tt;
      ans2 = 1;
    }
  }
  if (ans == 0)
    cout << "No solution" << endl;
  else
    cout << ans << " " << ans2 << endl;
  return 0;
}
