#include #include using namespace std; int main() { string a,b; cin >> a >> b; int count = a.size(); for (int i = 0; i < count; i++) { char c = a[i]; if (b.find(c) == string::npos) { cout << "NO" << "\n"; break; } } return 0; }