#include <bits/stdc++.h>
const long long MOD = 5000000;
using namespace std;
struct S {
  int sz;
  pair<int, int> arr[200001];
  S() { sz = 0; }
  void push(pair<int, int> val) { arr[sz++] = val; }
  void pop() { sz--; }
  pair<int, int> top() {
    assert(sz != 0);
    return arr[sz - 1];
  }
  void print() {
    for (int i = 0; i < sz; i++)
      cout << arr[i].first << ' ' << arr[i].second << endl;
    cout << endl;
  }
};
bool vowel(char c) {
  c = tolower(c);
  return c == 'a' || c == 'o' || c == 'e' || c == 'i' || c == 'u';
}
S st;
int f(int val) {
  if (!st.sz) return -1;
  int lo, hi;
  lo = 0;
  hi = st.sz - 1;
  int mid;
  while (lo < hi) {
    mid = (lo + hi) / 2;
    if (st.arr[mid].first > val) {
      lo = mid + 1;
    } else {
      hi = mid;
    }
  }
  mid = (lo + hi) / 2;
  if (st.arr[mid].first > val)
    return -1;
  else
    return st.arr[mid].second;
}
int main() {
  string str;
  cin >> str;
  int arr[str.size()];
  int cnt[200001] = {0};
  arr[0] = 0;
  for (int i = 1; i <= str.size(); i++) {
    arr[i] = arr[i - 1] + (vowel(str[i - 1]) ? -1 : 2);
  }
  st.push(make_pair(0, 0));
  for (int i = 1; i <= str.size(); i++) {
    int x;
    x = f(arr[i]);
    if (x != -1) {
      cnt[i - x]++;
    }
    if (!st.sz || st.top().first > arr[i]) {
      st.push(make_pair(arr[i], i));
    }
  }
  for (int i = 200000; i >= 0; i--) {
    if (cnt[i]) {
      cout << i << ' ' << cnt[i];
      return 0;
    }
  }
  cout << "No solution";
}
