Contest Duration: - (local time) (100 minutes) Back to Home

Time Limit: 2 sec / Memory Limit: 1024 MB

### 問題文

• S を先頭から順に w 文字毎に区切ったとき、長さが c 以上の文字列の c 文字目を順番に連結した文字列が T と一致する

### 制約

• ST は英小文字からなる文字列
• 1 \leq |T| \leq |S| \leq 100

### 入力

S T


### 入力例 1

atcoder toe


### 出力例 1

Yes


S2 文字毎に区切ると以下のようになります。

at
co
de
r


### 入力例 2

beginner r


### 出力例 2

No


w=|S| であることはないため、条件を満たすような 1 \leq c \leq w < |S| となる整数の組 cw は存在しません。よって、 No を出力します。

### 入力例 3

verticalreading agh


### 出力例 3

No


Score : 200 points

### Problem Statement

You are given two strings S and T consisting of lowercase English letters.

Determine if there exists a pair of integers c and w such that 1 \leq c \leq w < |S| and the following condition is satisfied. Here, |S| denotes the length of the string S. Note that w must be less than |S|.

• If S is split at every w characters from the beginning, the concatenation of the c-th characters of the substrings of length at least c in order equals T.

### Constraints

• S and T are strings consisting of lowercase English letters.
• 1 \leq |T| \leq |S| \leq 100

### Input

The input is given from Standard Input in the following format:

S T


### Output

Print Yes if there exists a pair of integers c and w such that 1 \leq c \leq w < |S| and the condition is satisfied, and No otherwise.

### Sample Input 1

atcoder toe


### Sample Output 1

Yes


If S is split at every two characters, it looks like this:

at
co
de
r


Then, the concatenation of the 2nd characters of the substrings of length at least 2 is toe, which equals T. Thus, print Yes.

### Sample Input 2

beginner r


### Sample Output 2

No


w=|S| is not allowed, and no pair of integers 1 \leq c \leq w < |S| satisfies the condition. Thus, print No.

### Sample Input 3

verticalreading agh


### Sample Output 3

No