#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200001, INF = 1000000000;
int n, MAX, sum[MAXN], c[3 * MAXN];
char s[MAXN];
int lowbit(int x) { return x & (-x); }
void update(int x, int id) {
  while (x <= MAX) {
    c[x] = min(c[x], id);
    x += lowbit(x);
  }
}
int query(int x) {
  int least = INF;
  while (x > 0) {
    least = min(least, c[x]);
    x -= lowbit(x);
  }
  return least;
}
bool isvowel(char c) {
  c = tolower(c);
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
void solve() {
  memset(c, 127, sizeof(c));
  scanf("%s", s);
  n = strlen(s);
  MAX = 3 * n + 1;
  sum[0] = 0;
  int i;
  for (i = 0; i < n; i++) sum[i + 1] = sum[i] + (isvowel(s[i]) ? -1 : 2);
  int longest = -INF;
  for (i = 0; i <= n; i++) {
    int value = sum[i] + n + 1;
    longest = max(longest, i - query(value));
    update(value, i);
  }
  if (longest <= 0) {
    printf("No solution\n");
    return;
  }
  int count = 0;
  for (i = 0; i + longest <= n; i++)
    if (sum[i + longest] >= sum[i]) count++;
  printf("%d %d\n", longest, count);
}
int main() {
  solve();
  return 0;
}
