Two lines
Given two strings, (S_1) and (S_2), each composed of lowercase Latin letters. For each string, a starting position ((k_1) and (k_2)) is selected. From this position, the characters of the string are written sequentially. Once the last character is reached, the sequence loops back to the beginning and continues. For instance, if (S_1) is "(CAB)" and (k_1 = 2) (with numbering starting from one), the resulting sequence is "(ABCABCABCABCABC...)". Similarly, if (S_2) is "(BCACAC)" and (k_2 = 3), the sequence becomes "(ACACBACACBACAC...)". These form two infinite sequences of characters, denoted as (T_1) and (T_2).
The task is to determine the values of (k_1) and (k_2) such that the expression's value is maximized. Here, (T_1[i]) represents the (i)-th character of the sequence (T_1), and (eq(a, b)) equals (1) if characters (a) and (b) are identical, and (0) if they differ. The goal is to maximize the average number of matching characters in the resulting sequences.
Input
The first line of the input contains the non-empty string (S_1). The second line contains the non-empty string (S_2). Each string's length does not exceed (2000) characters.
Output
Output the required numbers (k_1) and (k_2) ((1 k_1 length(S_1)), (1 k_2 length(S_2))).