#include <bits/stdc++.h>
using namespace std;
char vo[255];
char s[200010];
int pos[200010];
int main() {
  vo['a'] = vo['o'] = vo['e'] = vo['i'] = vo['u'] = true;
  scanf("%s", s);
  int n = strlen(s);
  for (int i = 0; i < n; i++) {
    if (s[i] >= 'A' && s[i] <= 'Z') {
      s[i] = s[i] - 'A' + 'a';
    }
  }
  vector<int> a;
  a.push_back(0);
  for (int i = 0; i < n; i++) {
    if (vo[s[i]])
      a.push_back(-1);
    else
      a.push_back(2);
  }
  for (int i = 0; i <= n; i++) pos[i] = n + 5;
  pos[0] = 0;
  int cur = 0;
  int len = 0;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    cur += a[i];
    if (cur >= 0) {
      len = i;
      cnt = 1;
    } else {
      pos[abs(cur)] = min(pos[abs(cur)], i);
      int l = pos[abs(cur)];
      if (i - l > len) {
        len = i - l;
        cnt = 1;
      } else if (i - l == len) {
        cnt++;
      }
    }
  }
  if (len == 0)
    puts("No solution");
  else
    printf("%d %d", len, cnt);
  return 0;
}
