import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] arr = sc.next().toCharArray(); HashMap counts = new HashMap<>(); HashMap idx = new HashMap<>(); for (int i = 1; i <= arr.length; i++) { counts.put(arr[i - 1], counts.getOrDefault(arr[i - 1], 0) + 1); idx.put(arr[i - 1], i); } for (char c : counts.keySet()) { if (counts.get(c) == 1) { System.out.println(idx.get(c) + " " + c); return; } } } }