Submit | All submissions | Best solutions | Back to list |
EI2122Q3ADAF3 - REMOVING CHARACTERS |
Given two strings S1 and S2. You are asked to check if it is possible to delete some characters from S1 to make it become S2.
Input
The first line is the string S1 (0 ≤ |S1| ≤ 105)
The second line is the string S2 (0 ≤ |S2| ≤ 105).
Both strings contain only lowercase characters.
Output
Print “YES” (without quotes) if it is possible to delete some characters from S1 to make it become S2, otherwise print “NO”.