#include <bits/stdc++.h>
using namespace std;
int const MAXN = 2e5 + 10;
int n, m, T;
string s;
int l[MAXN], r[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s;
  n = s.size();
  s = " " + s;
  int yuan = 0, fu = 0;
  int ans = 0, cnt = 1;
  for (int i = 1; i <= n; i++) {
    if (s[i] < 97) s[i] += 32;
    if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u')
      yuan++;
    else
      fu += 2;
    int t = fu - yuan + n + 1;
    if (t > n) {
      ans = i;
      continue;
    }
    if (!l[t]) l[t] = i;
    r[t] = i;
  }
  l[0] = 0x3f3f3f3f;
  for (int i = 1; i <= n; i++) {
    if (l[i]) {
      l[i] = min(l[i], l[i - 1]);
      int len = r[i] - l[i];
      if (len == ans) cnt++;
      if (len > ans) ans = len, cnt = 1;
    } else
      l[i] = l[i - 1];
  }
  if (ans)
    cout << ans << " " << cnt;
  else
    cout << " No solution";
  return 0;
}
