e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

2013 Petrozavodsk, February 2

Five Palindromes

Your task is to divide a string into five non-empty palindromes.

Input

Oone string consisting of n (5 n 105) lowercase English letters.

Output

Output "NO" if such division is impossible. Otherwise, output "YES" on the first line, and the next five lines should contain one palindrome each, which, if concatenated in this order, form the given string.

Time limit 6 seconds
Memory limit 64 MiB
Input example #1
aaabbcdcaa
Output example #1
YES
a
aa
bb
cdc
aa
Author M.Rubinchik, K.Borozdin
Source 2013 Petrozavodsk, Winter, Ural FU contest, Kontur Cup, Problem D