#include<stdlib.h>
#include<stdio.h>
using namespace std;
int main()
{
  char string a,b;
  cin>>a;
  cin>>b;
  int x;
  x=strstr(b,a);
  if(x==NULL)
    cou<<"No\n";
  else
    cout<<"Yes\n";
  return 0;
}