#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using P = pair; int main(void) { string s; cin >> s; vector cnt(2, 0); char c = s[0], ans; int res; for (int i = 1; i < s.size(); i++) { if (s[i] == c) { cnt[0]++; } else { cnt[1]++; res = i + 1; ans = s[i]; } } if (cnt[0] > cnt[1]) cout << res << " " << ans << endl; else cout << 1 << " " << c << endl; return 0; }