#includeusing namespace std; char s[200005],p[200005],t[200005]; int main() { while(scanf("%s %s",&s,&p)!=EOF) { strcpy(t,s);strcat(s,t); if(strlen(t)>strlen(p)&&strstr(s,p)!=NULL) cout<<"yes"<
#includeusing namespace std; char s[200005],p[200005],t[200005]; int main() { while(scanf("%s %s",&s,&p)!=EOF) { strcpy(t,s);strcat(s,t); if(strlen(t)>strlen(p)&&strstr(s,p)!=NULL) cout<<"yes"<