#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <typename T>
using minpq = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
using maxpq = priority_queue<T>;
inline long long CC(long long n, long long y) {
  return (((n) + (y - 1) - 1) / (y - 1)) - (((n) + (y)-1) / (y));
}
inline long long FF(long long n, long long y) { return n / y - n / (y + 1); }
inline long long __gcd(long long a, long long b) {
  return !b ? a : __gcd(b, a % b);
}
inline int add(int a, int b, int p = 1000000007) {
  int c = a + b;
  if (c >= p) c -= p;
  return c;
}
inline int sub(int a, int b, int p = 1000000007) {
  int c = a - b;
  if (c < 0) c += p;
  return c;
}
inline int mul(int a, int b, int p = 1000000007) { return (a * 1ll * b) % p; }
long long cnt, n;
string s;
long long st[200005 << 2];
map<long long, long long> m;
inline long long op(long long a, long long b) { return min(a, b); }
void build(long long i, long long l, long long r) {
  long long m = (l + r) >> 1;
  if (l == r) {
    st[i] = n;
    return;
  }
  long long lc, rc;
  lc = i << 1;
  rc = (i << 1) | 1;
  build(lc, l, m);
  build(rc, m + 1, r);
  st[i] = op(st[lc], st[rc]);
}
void update(long long x, long long val, long long i, long long l, long long r) {
  if (l == r) {
    st[i] = min(st[i], val);
    return;
  }
  long long m = (l + r) >> 1;
  long long lc = i << 1, rc = (i << 1) | 1;
  if (x <= m)
    update(x, val, lc, l, m);
  else
    update(x, val, rc, m + 1, r);
  st[i] = op(st[lc], st[rc]);
}
long long query(long long ql, long long qr, long long i, long long l,
                long long r) {
  if (ql <= l && qr >= r) return st[i];
  if (ql > r || qr < l) return n;
  long long m = (l + r) >> 1;
  long long lc = i << 1, rc = (i << 1) | 1;
  return op(query(ql, qr, lc, l, m), query(ql, qr, rc, m + 1, r));
}
void print_tree(long long num_nodes) {
  for (long long i = 1; i <= num_nodes; i++) {
    cerr << i << ' ' << st[i] << '\n';
  }
}
bool isVowel(char c) {
  c = tolower(c);
  return c == 'a' || c == 'e' || c == 'i' || c == 'u' || c == 'o';
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  clock_t clk = clock();
  cerr << "I will return...\n";
  cin >> s;
  n = s.size();
  m[0] = 0;
  long long c, v;
  c = v = 0;
  for (long long i = (0); i < (n); i++) {
    v += isVowel(s[i]);
    c += !isVowel(s[i]);
    m[v - 2 * c] = 0;
  }
  for (auto& p : m) p.second = cnt++;
  build(1, 0, cnt - 1);
  update(m[0], -1, 1, 0, cnt - 1);
  long long mx = 0, cntm = 1;
  v = c = 0;
  for (long long i = (0); i < (n); i++) {
    v += isVowel(s[i]);
    c += !isVowel(s[i]);
    long long kk = m[v - 2 * c];
    long long j = query(kk, cnt - 1, 1, 0, cnt - 1);
    update(kk, i, 1, 0, cnt - 1);
    long long cur = i - j;
    if (cur > mx) mx = cur, cntm = 0;
    cntm += cur == mx;
  }
  if (!mx) {
    cout << "No solution\n";
  } else {
    cout << mx << ' ' << cntm << '\n';
  }
  cerr << "...don't you ever hang your head.\n";
  cerr << "Time (in ms): " << double(clock() - clk) * 1000.0 / CLOCKS_PER_SEC
       << '\n';
}
