include[HTML_REMOVED]
using namespace std;
const int N=1e5+9;
int main(){
int n,m,a[N],b[N];
int cnt=0;
scanf(“%d%d”,&n,&m);
for(int i=0;i<n;i)scanf(“%d”,&a[i]);
for(int j=0;j<m;j)scanf(“%d”,&b[j]);
for(int i=0,j=0;i<n;i){
while(a[i]!=b[j]&&j<m)j;
if(a[i]==b[j]&&j<m){cnt;j;}
}
//printf(“%d “,cnt);
if(cnt==n)cout<<”Yes”<<endl;
else cout<<”No”<<endl;
}