#include <bits/stdc++.h>
using namespace std;
char s[300000];
int d[400000];
int A[400000], B[400001];
int main(void) {
  cin >> s;
  int i, j, n = 0, k = 0, m = 0;
  for (m = 0; s[m]; m++) {
    if (s[m] == 'a' || s[m] == 'e' || s[m] == 'i' || s[m] == 'o' ||
        s[m] == 'u' || s[m] == 'A' || s[m] == 'E' || s[m] == 'I' ||
        s[m] == 'O' || s[m] == 'U')
      d[n++] = 1, k++;
    else
      d[n++] = 0, d[n++] = 0;
  }
  if (k == n)
    cout << "No solution";
  else if (k <= 2 * (n - m))
    cout << m << " " << 1;
  else {
    for (i = 0; i < n; i++) B[i] = -1;
    j = 0;
    for (i = 0; i < n; i++) {
      if (d[i])
        A[j++] = i;
      else if (j > 0)
        B[A[--j]] = i + 1;
    }
    j = 0;
    for (i = 0; i < n; i++) {
      if (!d[i])
        A[j++] = i;
      else if (j > 0)
        B[A[--j]] = i + 1;
    }
    B[n] = 0;
    int mx = 0, r = 0;
    for (i = n - 1; i >= 0; i--) {
      if (B[i] == -1)
        B[i] = 0;
      else
        B[i] = B[B[i]] + B[i] - i;
      if (B[i] > mx)
        mx = B[i], r = 1;
      else if (B[i] == mx)
        r++;
    }
    cout << 3 * mx / 4 << " " << r;
  }
  return 0;
}
