Problem2427--B - Prefix?

2427: B - Prefix?

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 200200 points

Problem Statement

You are given two strings SS and TT consisting of lowercase English letters. Determine if SS is a prefix of TT.
What is a prefix?A prefix of a string T_1T_2\ldots T_NT1T2TN of length NN is a string expressed as the first ii characters of TTT_1T_2\ldots T_iT1T2Ti, where ii is an integer such that 0 \leq i \leq N0iN. For example, when T =T= abc, there are four prefixes of TT: an empty string, a, ab, and abc.

Constraints

  • SS and TT are strings of lengths between 11 and 100100 (inclusive) consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:
SSTT

Output

Print Yes if SS is a prefix of TT; print No otherwise. Note that the judge is case-sensitive.

Sample Input Copy

atco
atcoder

Sample Output Copy

Yes

HINT

atco is a prefix of atcoder. Thus, Yes should be printed.

Source/Category