#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;
	
}