#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const double PI = acos(-1);
const int INF = (int)1e9 + 7;
const int MAXN = (int)1e6 + 7;
int n;
pair<int, int> first[MAXN];
char second[MAXN];
bool vowel(char x) {
  x = tolower(x);
  return (x == 'a' || x == 'u' || x == 'e' || x == 'o' || x == 'i');
}
int main() {
  scanf("%s", &second);
  n = strlen(second);
  for (int i = 0; i < n; i++) {
    first[i + 1].first = first[i].first;
    if (vowel(second[i]))
      first[i + 1].first -= 1;
    else
      first[i + 1].first += 2;
  }
  for (int i = 0; i <= n; i++) first[i].second = i;
  sort(first, first + n + 1);
  int ans = -INF, cnt = 0;
  int pos = INF;
  for (int i = 0; i <= n; i++) {
    int x = first[i].second - pos;
    if (x > ans)
      ans = x, cnt = 1;
    else if (x == ans)
      ++cnt;
    pos = min(pos, first[i].second);
  }
  if (ans < 0)
    cout << "No solution";
  else
    cout << ans << ' ' << cnt;
  return 0;
}
