Problem H: Character - Ring

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $188$ 正确数量 $98$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL 字符串 动态规划

Ring 

Write a program which finds a pattern p in a ring shaped text s.

In the first line, the text s is given. 

In the second line, the pattern p is given.

If p is in s, print Yes in a line, otherwise No.
vanceknowledgetoad
advance
Yes

1≤ length of p≤ length of s≤100

s and p consists of lower-case letters