#include <bits/stdc++.h>
using namespace std;
long long n, ans;
string s;
map<long long, long long> m;
vector<long long> presum(1);
long long get(long long loc) {
  auto it = m.upper_bound(loc);
  if (it == m.begin()) return presum.size();
  it--;
  return it->second;
}
void push(long long loc, long long val) {
  if (m.upper_bound(loc) == m.begin()) m[loc] = val;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s;
  n = s.size();
  transform(s.begin(), s.end(), s.begin(), ::tolower);
  string vowels = "aeiou";
  m[0] = 0;
  for (auto &i : s) {
    if (vowels.find(i) == std::string::npos) {
      presum.push_back(presum.back() + 2);
    } else {
      presum.push_back(presum.back() - 1);
    }
    ans = max<long long>(ans, presum.size() - get(presum.back()) - 1);
    if (presum.back() < 0) push(presum.back(), presum.size() - 1);
  }
  if (ans) {
    cout << ans << " ";
    long long cnt = 0;
    for (long long i = ans; i <= n; i++) {
      cnt += (presum[i] >= presum[i - ans]);
    }
    cout << cnt;
  } else {
    cout << "No solution";
  }
  return 0;
}
