#include <iostream>
#include <string>

using namespace std;


int main()
{

    long long int n;
    cin >> n;
   long long  int arr[n];
    for (long long int i = 0; i < n ; i++ )
    {
      cin >> arr[i];
    }

    int m;
    cin >> m ;
    int arr1[m];
     for (int j = 0 ; j < m ; j++)
    {
      cin >> arr1[j];
    }

    int count = 0;

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


  
    return 0;
 }