IntermediateLists2000 ms256 MB
Bus Route Check
Given a list of route stop names and a school name, print `YES` if the school appears in the route and `NO` otherwise.
Statement
Given a list of route stop names and a school name, print `YES` if the school appears in the route and `NO` otherwise.
Input
First line: `n`. Next `n` lines: stop names. Last line: school name.
Output
Print `YES` or `NO`.
Constraints
- `1 <= n <= 1000`
Examples
Example 1
Input
3
Half Way Tree
Papine
Mona High
Mona HighOutput
YESMona High appears in the route list.
Sample runs use visible examples. Full submissions are checked securely on the server, and private test cases are not shown in the browser.