#include <iostream>
#include <string>

using namespace std;


int main()
{

    int n,m;
    cin >> n >> m;
    int arr[n];
    int arr1[m];
    int count = 0;

    for (int i = 0; i < n ; i++ )
    {
      cin >> arr[i];
    }
    for (int j = 0 ; j < m ; j++)
    {
      cin >> arr1[j];
    }
    for (int j = 0; j < m ; j++)
    {
      for (int i = 0; i < n ; i++)
      {
        if (arr1[j] == arr[i])
        {
          count++;
        }
      }
    }
    if (count == m)
    {
      cout << "Yes";
    }
    else
    cout << "No";


  
    return 0;
 }