atcoder#ABC268B. [ABC268B] Prefix?
[ABC268B] Prefix?
Score : points
Problem Statement
You are given two strings and consisting of lowercase English letters. Determine if is a prefix of .
What is a prefix?
A prefix of a string T_1T_2\ldots T_N of length N is a string expressed as the first i characters of T, T_1T_2\ldots T_i, where i is an integer such that 0 \leq i \leq N. For example, when T = abc, there are four prefixes of T: an empty string, a, ab, and abc.Constraints
- and are strings of lengths between and (inclusive) consisting of lowercase English letters.
Input
Input is given from Standard Input in the following format:
Output
Print Yes
if is a prefix of ; print No
otherwise.
Note that the judge is case-sensitive.
atco
atcoder
Yes
atco
is a prefix of atcoder
. Thus, Yes
should be printed.
code
atcoder
No
code
is not a prefix of atcoder
. Thus, No
should be printed.
abc
abc
Yes
Note that a string is also a prefix of itself.
aaaa
aa
No