#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int m;
  cin >> m;
  vector<int> b(m);
  for (int i = 0; i < m; i++) cin >> b[i];
  vector<int> lth(m);
  int pt = 0;
  for (int i = 0; i < m; i++) {
    int cr = b[i];
    int leng = 0;
    while (pt < n and cr >= a[pt]) {
      cr -= a[pt];
      leng++;
      pt++;
    }
    if (cr != 0) {
      cout << "NO\n";
      return 0;
    }
    lth[i] = leng;
  }
  if (pt < n) {
    cout << "NO\n";
    return 0;
  }
  pt = 0;
  vector<pair<int, int> > segs;
  ;
  for (int i = 0; i < m; i++) {
    segs.push_back({pt, pt + lth[i] - 1});
    pt += lth[i];
  }
  for (int i = 0; i < m; i++) {
    if (lth[i] == 1) continue;
    int mx =
        *max_element(a.begin() + segs[i].first, a.begin() + segs[i].second + 1);
    bool all_eq_mx = true;
    int ind = 0;
    int l = segs[i].first, r = segs[i].second;
    for (int j = l; j <= r; j++) {
      if (mx != a[j]) {
        all_eq_mx = false;
        ind = j;
      }
    }
    if (all_eq_mx) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << endl;
  vector<pair<int, pair<int, int> > > arr;
  for (int i = 0; i < m; i++) {
    if (lth[i] == 1) {
      arr.push_back({a[segs[i].first], {0, 0}});
      continue;
    }
    int mx =
        *max_element(a.begin() + segs[i].first, a.begin() + segs[i].second + 1);
    int l = segs[i].first, r = segs[i].second;
    int ind = -1;
    for (int j = l; j <= r; j++) {
      bool both_eq = true;
      if (a[j] == mx) {
        if (j != l) {
          both_eq &= a[j - 1] == mx;
        }
        if (j != r) {
          both_eq &= a[j + 1] == mx;
        }
        if (!both_eq) {
          ind = j;
          break;
        }
      }
    }
    for (int j = l; j < ind; j++) {
      arr.push_back({a[j], {0, 0}});
    }
    arr.push_back({a[ind], {ind - l, r - ind}});
    for (int j = ind + 1; j <= r; j++) {
      arr.push_back({a[j], {0, 0}});
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n - m; i++) {
    for (int j = 0; j < arr.size(); j++) {
      if (arr[j].second.first != 0 and arr[j - 1].first < arr[j].first) {
        cout << j + 1 << " L\n";
        arr[j].second.first -= 1;
        arr[j].first += arr[j - 1].first;
        arr.erase(arr.begin() + j - 1);
        break;
      }
      if (arr[j].second.second != 0 and arr[j + 1].first < arr[j].first) {
        cout << j + 1 << " R\n";
        arr[j].second.second -= 1;
        arr[j].first += arr[j + 1].first;
        arr.erase(arr.begin() + j + 1);
        break;
      }
    }
  }
}
