#include using namespace std; int main(){ string s; cin >> s; int ans = -1; if(s[0] == s.back()){ for(int i = 1; i < s.size(); i++){ if(s[i] != s[0])ans = i + 1; } }else{ ans = (s[0] == s[1] ? s.size() : 1); } cout << ans << " " << s[ans-1] << endl; }