printРабочее место участника

printЗадачи

2335. Acronym

Ограничения: время – 200ms/500ms, память – 256MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

Inspector Lestrade discovered that Moriarty’s criminal organization has acronym ICPC, and he is trying to find the full name of the organization. An acronym is a word or name formed as an abbreviation from the initial letters in a phrase.
Input
Input consists of two lines:
  • The acronym.
  • The words separated by spaces.
The acronym and all the words consist of lowercase english letters. The number of words is greater than 1 and less than 10. This number may be different from the number of letters in the acronym.
Output
Print 'yes', if the acronym may have come from the given words. Print 'no' otherwise.

Sample Input

icpc
ingenious criminal powerful company

Sample Output

yes
loading