#abc279b. [abc279_b]LOOKUP
[abc279_b]LOOKUP
Problem Statement
You are given strings and consisting of lowercase English letters. Determine whether is a (contiguous) substring of .
A string is said to be a (contiguous) substring of if and only if can be obtained by performing the operation below on zero or more times.
- Do one of the following.
- Delete the first character in .
- Delete the last character in .
For instance, tag
is a (contiguous) substring of voltage
, while ace
is not a (contiguous) substring of atcoder
.
Constraints
- and consist of lowercase English letters.
- ( denotes the length of a string .)
Input
The input is given from Standard Input in the following format:
Output
If is a (contiguous) substring of , print Yes
; otherwise, print No
.
Sample Input 1
voltage
tag
Sample Output 1
Yes
tag
is a (contiguous) substring of voltage
.
Sample Input 2
atcoder
ace
Sample Output 2
No
ace
is not a (contiguous) substring of atcoder
.
Sample Input 3
gorilla
gorillagorillagorilla
Sample Output 3
No
Sample Input 4
toyotasystems
toyotasystems
Sample Output 4
Yes
It is possible that .