#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)5e5 + 100;
const int mod = (int)1e9 + 7;
string second;
int n, p[maxn], ans = -1, cnt;
int ok(char ch) {
  ch = tolower(ch);
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') return 1;
  return 0;
}
int check(int len) {
  int was = 0;
  cnt = 0;
  for (int i = (1); i <= (n - len + 1); ++i) {
    if ((len - (p[i + len - 1] - p[i - 1])) * 2 >= p[i + len - 1] - p[i - 1]) {
      was = 1;
      ans = len;
      cnt++;
    }
  }
  return was;
}
int main() {
  cin >> second;
  n = ((int)(second).size());
  second = '1' + second;
  for (int i = (1); i <= (n); ++i) {
    p[i] = p[i - 1] + ok(second[i]);
  }
  int l = 1, r = n;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  for (int i = (max(1, ans - 200)); i <= (min(n, ans + 200)); ++i) check(i);
  check(ans);
  if (ans <= 0) {
    cout << "No solution";
    return 0;
  }
  cout << ans << " " << cnt;
}
