#include <bits/stdc++.h>
using namespace std;
bool mark[210000];
struct node {
  int x, sum;
};
int sum[210000];
int main() {
  string s;
  int i, j, k, x, T, mx, ans, low, high;
  node ss;
  while (cin >> s) {
    for (i = 0; i < s.size(); i++) {
      if (s[i] >= 'A' && s[i] <= 'Z') s[i] = s[i] - 'A' + 'a';
    }
    memset(sum, 0, sizeof(sum));
    memset(mark, 0, sizeof(mark));
    for (i = 0; i < s.size(); i++) {
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u')
        mark[i] = true;
    }
    vector<node> l;
    ss.x = -1;
    ss.sum = 0;
    l.push_back(ss);
    mx = -1;
    T = 0;
    for (i = 0; i < s.size(); i++) {
      if (i) sum[i] = sum[i - 1];
      if (mark[i])
        sum[i] += -1;
      else
        sum[i] += 2;
      low = 0;
      high = l.size() - 1;
      ans = -1;
      while (low <= high) {
        int mid = (low + high) / 2;
        if (sum[i] - l[mid].sum >= 0) {
          ans = i - l[mid].x;
          high = mid - 1;
        } else
          low = mid + 1;
      }
      if (ans == mx) T++;
      if (ans > mx) {
        mx = ans;
        T = 1;
      }
      if (sum[i] < l[l.size() - 1].sum) {
        ss.sum = sum[i];
        ss.x = i;
        l.push_back(ss);
      }
    }
    if (mx == -1)
      cout << "No solution" << endl;
    else
      cout << mx << " " << T << endl;
  }
  return 0;
}
