#include <bits/stdc++.h>
using namespace std;
int n, sum, f[800800], ans, cnt;
string s;
int vowel(char c) {
  if (c <= 'Z') c += 'a' - 'A';
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
void add(int x, int val) {
  x += 200100;
  while (x <= 2 * n + 200100) {
    if (f[x] <= val) return;
    f[x] = val;
    x += x & -x;
  }
}
int get(int x) {
  x += 200100;
  int r = n + 1;
  while (x) r = min(r, f[x]), x -= x & -x;
  return r;
}
int main() {
  cin >> s;
  n = int(s.size());
  s = "*" + s;
  for (int i = 1; i <= 2 * n + 200100; i++) f[i] = n + 1;
  add(0, 0);
  for (int i = 1; i <= n; i++) {
    sum += !vowel(s[i]);
    int x = get(sum * 3 - i);
    if (i - x == ans)
      cnt++;
    else if (i - x > ans)
      ans = i - x, cnt = 1;
    add(sum * 3 - i, i);
  }
  if (!ans)
    puts("No solution");
  else
    cout << ans << ' ' << cnt << endl;
}
