AdvancedRating 1800
Interleaving Strings
Print YES if the third string is formed by interleaving the first two (keeping their internal order).
Input
Three lines.
Output
YES or NO.
Sample 1
Input
aabcc dbbca aadbbcbcac
Output
YES
Sample 2
Input
aabcc dbbca aadbbbaccc
Output
NO
Output appears here