#include <bits/stdc++.h>
using namespace std;
int arr[509], narr[509];
vector<pair<char, int> > mp;
vector<pair<char, int> >::iterator ii;
int main() {
  int n, k, i, j;
  long long sum1 = 0, sum2 = 0;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%d", &arr[i]);
    sum1 = sum1 + (long long)arr[i];
  }
  scanf("%d", &k);
  for (i = 0; i < k; ++i) {
    scanf("%d", &narr[i]);
    sum2 = sum2 + (long long)narr[i];
  }
  if (sum1 != sum2) {
    printf("NO\n");
  } else {
    int start = 0, end = -1, flag = 0;
    for (i = 0; i < k; ++i) {
      long long tsum = 0;
      end = -1;
      for (j = start; j < n; ++j) {
        tsum = tsum + (long long)arr[j];
        if (tsum == (long long)narr[i]) {
          end = j;
          break;
        }
      }
      if (end == -1) {
        flag = 1;
      } else {
        int cflag = 0;
        for (j = start; j <= end; ++j) {
          if (j + 1 <= end && arr[j] != arr[j + 1]) {
            cflag = 1;
          }
        }
        if (end == start) cflag = 1;
        if (!cflag) {
          flag = 1;
        } else {
          int ref = -1, index = -1;
          for (j = start; j <= end; ++j) {
            if (arr[j] > ref) {
              ref = arr[j];
              index = j;
            }
          }
          if (index == start) {
            for (j = start + 1; j <= end; ++j) {
              if (arr[j] == arr[index])
                continue;
              else
                break;
            }
            index = j - 1;
            int sindex = index, mindex;
            while (sindex != end) {
              mp.push_back(make_pair('R', (i + index - start + 1)));
              sindex++;
            }
            while (index != start) {
              mindex = i + (index - start + 1);
              mp.push_back(make_pair('L', mindex));
              index--;
            }
          } else {
            int sindex = index, mindex;
            while (index != start) {
              mindex = i + (index - start + 1);
              mp.push_back(make_pair('L', mindex));
              index--;
            }
            index = sindex;
            while (index != end) {
              mp.push_back(make_pair('R', i + 1));
              index++;
            }
          }
        }
        start = end + 1;
      }
      if (flag) break;
    }
    if (flag)
      printf("NO");
    else {
      printf("YES\n");
      for (ii = mp.begin(); ii != mp.end(); ++ii) {
        cout << ii->second << " " << ii->first << endl;
      }
    }
  }
  return 0;
}
