

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 100 点
問題文
高橋君はとあるWebサービスに会員登録しようとしています。
まずIDを S として登録しようとしました。しかし、このIDは既に他のユーザーによって使用されていました。
そこで、高橋君は S の末尾に 1 文字追加した文字列をIDとして登録することを考えました。
高橋君は新しくIDを T として登録しようとしています。これが前述の条件を満たすか判定してください。
制約
- S, T は英小文字列
- 1 \leq |S| \leq 10
- |T| = |S| + 1
入力
入力は以下の形式で標準入力から与えられる。
S T
出力
T が問の条件を満たすならば Yes
と、そうでないならば No
と出力せよ。
入力例 1
chokudai chokudaiz
出力例 1
Yes
chokudaiz
は chokudai
の末尾に z
を追加して得られる文字列です。
入力例 2
snuke snekee
出力例 2
No
snekee
は snuke
の末尾に英小文字を 1 文字追加して得られる文字列ではありません。
入力例 3
a aa
出力例 3
Yes
Score : 100 points
Problem Statement
Takahashi wants to be a member of some web service.
He tried to register himself with the ID S, which turned out to be already used by another user.
Thus, he decides to register using a string obtained by appending one character at the end of S as his ID.
He is now trying to register with the ID T. Determine whether this string satisfies the property above.
Constraints
- S and T are strings consisting of lowercase English letters.
- 1 \leq |S| \leq 10
- |T| = |S| + 1
Input
Input is given from Standard Input in the following format:
S T
Output
If T satisfies the property in Problem Statement, print Yes
; otherwise, print No
.
Sample Input 1
chokudai chokudaiz
Sample Output 1
Yes
chokudaiz
can be obtained by appending z
at the end of chokudai
.
Sample Input 2
snuke snekee
Sample Output 2
No
snekee
cannot be obtained by appending one character at the end of snuke
.
Sample Input 3
a aa
Sample Output 3
Yes