Pizza Restaurant

시간 제한1초메모리 제한2048 MB

문제

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.