시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB73125.000%

문제

You are given $n$ strings $s_1, s_2, \ldots, s_n$. Find any two different indices $x$ and $y$ and a positive integer $k$ such that the string $s_{x}\underbrace{s_{y} s_{y} \ldots s_{y}}_{k\text{ times}}$ is a palindrome with length at most $6 \cdot 10^6$, or report that it is impossible.

입력

The first line contains a single integer $n$ ($2 \le n \le 10^5$).

The next $n$ lines contain $n$ strings $s_1, s_2, \ldots, s_n$, one per line ($1 \leq |s_i| < 10^6$). The strings consist of lowercase English letters. The total length of all strings does not exceed $10^6$.

출력

If there is no answer, output "No" (without quotes).

Otherwise, on the first line, print "Yes" (without quotes). On the second line, print three integers $x$, $y$, and $k$ ($1 \le x,y \le n$, $x \ne y$, $k \ge 1$, $|s_x| + k \cdot |s_y| \le 6 \cdot 10^6$). If there are multiple solutions, print any one of them.

예제 입력 1

2
aa
aa

예제 출력 1

Yes
1 2 1

예제 입력 2

4
a
bb
bcb
cdc

예제 출력 2

No

예제 입력 3

2
ap
papajoj

예제 출력 3

Yes
2 1 2