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


<image>

Constraints

* $1 \leq $ length of $p \leq $ length of $s \leq 100$
* $s$ and $p$ consists of lower-case letters

Input

In the first line, the text $s$ is given.
In the second line, the pattern $p$ is given.

Output

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

Examples

Input

vanceknowledgetoad
advance


Output

Yes


Input

vanceknowledgetoad
advanced


Output

No
#include <iostream>
#include <string>
using namespace std;

int main(void)
{
	string s, p;
	cin >> s >> p;
	s = s + s;
	if (s.find(p) != -1) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

vanceknowledgetoad
advance vanceknowledgetoad
advanced vanceknowledgetoad
edvanca vanceknowledgetoad
bdvanced vanceknowledgetoad
edvamca vanceknowledgetoad
cdvanced daotegdelwonkecnav
edvamca vanceknowmedgetoad
cdvanced daotegdelwonkecnav
advamce vbnceknowmedgetoad
cdvanced daovegdelwonkecnat
advamce vbnceknowledgetoad
cdvanced daovegdelwonkecnat
acvamde vbncekoowledgetoad
cdvanced eaovegddlwonkecnat
acvamde vbncekonwledgetoad
cdvanced eaovlgddewonkecnat
acvamde vbnbekonwledgetoad
cdvanced eaovlgedewonkecnat
acvamde vbnbekonwlddgetoad
cdvanced eaovlgedewonkecnat
edmavca vbnbelonwlddgetoad
cdvanced tanceknowedeglvoae
edmavca vanbelonwlddgetoad
cdvanced tanceknowedeglvoae
edaavcm vanbelonwlddgetoad
cdvancee eaovlgedewonkecnat
ddmavca vanbelonwlddgdtoad
cdvancee eaovlgedewonkecnat
ddnavca vanbeloowlddgdtnad
cdvancee eaovlgedexonkecnat
ddnavca vanbeloowlddgdtnad
cdvanbee eaovlgedexonkecnat
denavca vanbeloowldegdtnad
cdvanbee eaovlgedexonkecnat
dencvaa vanbeloowldegdtnad
cdwanbee tanceknoxedeglvoae
dencvaa vanbeloowldegdtnad
cdwenbea eaovlgedexonkecnat
aavcned vanbeloowmdegdtnad
cdwenbea eaovlgedexonkecnat
`avcned vanbelpowmdegdtnad
cdwenbea eaovlgedexonkecnat
`avcndd vanbelpowmdegetnad
cdwenbea eaovlgedexonkecnat
`avcdnd vanbelpowmdegetnad
cdewnbea eaovlgedexonkecnat
dndcva` vanbelpowmeegetnad
cdewnbea eaevlgedoxonkecnat
dndcva` vanbelpowmeegetnad
ddewnbea eaevlgedoxonkecnat
dnccva` vanbelpowmeegetnad
ddewnbda eaevlgedoxonkectan
dnccva` vanbelpowmeegdtnae
ddewnbda eaevlgedoxonkectan
dn`cvac vanbelpowmeegdtnae
deewnbda eaevlgedoconkextan
dn`cvac vanbelpowmeegdtnae
adbnweed eaovlgedeconkextan
dn`cvac vanbetpowmeegdlnae
adbnweed eaovlgedeconkextan
dnvc`ac vatbenpowmeegdlnae
adbnweed faovlgedeconkextan
dnvc`ac vatbenpowmefgdlnae
adbnweed faovlgedeconkextan
dnvcaac vadbenpowmefgtlnae
adbnweed faovlgedeconkextan
dcvcaan vadbenpowmefgtlnae
adboweed faovlgedeconkextan
dcvcaam vadbenpowmefgtlnae
deewobda faovlgedeconkextan
dcvcabm vadbenpowmefgtlnae
ddewobda faovlgedeconkextan
dcbcavm vadbenpowmefgtlnae
cdewobda favolgedeconkextan
dcbcavm vadbenpowmefgtlnae
adbowedc favolgedeconkextan
mvacbcd eanltgfemwopnebdav
adbowedc favolgedeconkdxtan
mvacbcd eanetgfemwopnlbdav
adbowedc favolgedeconkdxtan
mvacbbd vadblnpowmefgtenae
adbowedc favolgedeconkdxtan
mvbcbbd v`dblnpowmefgtenae
adbowedc favolgedeconkdxtan
mvbcbbe v`dblnpowmefgtenae
adbovedc favolgedeconkdxtan
nvbcbbe eanetgfemwopnlbd`v
adbovedc favolgececonkdxtan
nvbcbbe eanetgfemwopnkbd`v
adbovedc favolgececonkdxtan
nvbcbbd eanetgfemwopnkbd`v
adbcvedo favolgececonkdxtan
nvbcbbc eanetgfemwopnkbd`v
acbdvedo favomgececonkdxtan
nvbcbbc v`dbknpowmefgtenae
acbdvedo favomgececonkdxtan
ovbcbbc v`dbknpowmefgtenae
adbdvedo favomfececonkdxtan
ovbcbbc v`dblnpowmefgtenae
adbdvedo favomfececonkdxtan
obvcbbc w`dblnpovmefgtenae
adbdvedo
Yes No No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
 No
