|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|0.2 초||256 MB||26||4||4||20.000%|
You have two strings and you need to check whether you can cut the second one into three pieces so that the first string can be concatenated from these three pieces.
The input file contains two non-empty strings, each on a separate line. Each string consists of at most 5000 lowercase roman letters. Strings have the same length and each letter has the same number of occurrences in both strings.
Print YES if it is possible to cut the string as described, and NO in the opposite case. If you print YES, the following three lines should contain the parts of the second string in the correct concatenation order. These parts cannot be empty. If you have several options to cut, print any of them.
YES be as t