Pizza Restaurant
시간 제한1초메모리 제한2048 MB
서로 다른 두 문자열과 반복 횟수 k를 골라 첫 문자열 뒤에 두 번째 문자열을 k번 붙인 결과가 길이 제한 안에서 회문이 되게 하라.
문제
You are given strings . Find any two different indices and and a positive integer such that the string is a palindrome with length at most , or report that it is impossible.
입력
The first line contains a single integer ().
The next lines contain strings , one per line (). The strings consist of lowercase English letters. The total length of all strings does not exceed .
출력
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 , , and (, , , ). If there are multiple solutions, print any one of them.