#include <iostream>
using namespace std;
int main() {
string s, t;
cin >> s;
cin >> t;
bool bandera = false;
for(int i = 0; i < s.size(); i++){
int cnt = 0;
for(int j = 0; j < t.size(); j++){
if(s[i+j] == t[j]){
cnt++;
}
}
if(cnt == t.size()){
bandera = true;
}
}
if(bandera == true){
cout << "SI";
}else{
cout << "NO";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzdHJpbmcgcywgdDsKCWNpbiA+PiBzOwoJY2luID4+IHQ7CgkKCWJvb2wgYmFuZGVyYSA9IGZhbHNlOwoJCglmb3IoaW50IGkgPSAwOyBpIDwgcy5zaXplKCk7IGkrKyl7CgkJaW50IGNudCA9IDA7CgkJZm9yKGludCBqID0gMDsgaiA8IHQuc2l6ZSgpOyBqKyspewoJCQlpZihzW2kral0gPT0gdFtqXSl7CgkJCQljbnQrKzsKCQkJfQoJCX0KCQlpZihjbnQgPT0gdC5zaXplKCkpewoJCQliYW5kZXJhID0gdHJ1ZTsKCQl9Cgl9CgkKCWlmKGJhbmRlcmEgPT0gdHJ1ZSl7CgkJY291dCA8PCAiU0kiOwoJfWVsc2V7CgkJY291dCA8PCAiTk8iOwoJfQoJCglyZXR1cm4gMDsKCQp9