#include #include using namespace std; int main(){ string s; cin >> s; map cnt; int n = s.size(); for(int i = 0; i < n; i++){ cnt[s[i]]++; } char ans1; int k = 123456789; for(auto i : cnt){ if(i.second < k){ k = i.second; ans1 = i.first; } } int ans2; for(int i = 0; i < n; i++){ if(s[i] == ans1)ans2 = i + 1; } cout << ans2 << " " << ans1 << endl; return 0; }