#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000], b[1000];
int dp[1000][1000];
int k;
int pos[1000][1000];
bool start[1000][1000];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  cin >> k;
  for (int i = 1; i <= k; i++) cin >> b[i];
  memset(dp, 0xFF, sizeof(dp));
  dp[0][0] = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= min(i, k - 1); j++) {
      if (dp[i][j] != -1) {
        int sum = 0;
        int max = 0;
        vector<int> maxpos;
        for (int l = i + 1; l <= n; l++) {
          sum += a[l];
          if (a[l] > max) {
            max = a[l];
            maxpos.clear();
            maxpos.push_back(l);
          } else if (a[l] == max) {
            maxpos.push_back(l);
          }
          if (sum > b[j + 1])
            break;
          else if (sum == b[j + 1]) {
            if (l - i == 1) {
              dp[l][j + 1] = i;
              break;
            }
            if ((int)maxpos.size() != l - i) {
              for (vector<int>::iterator iter = maxpos.begin();
                   iter != maxpos.end(); iter++) {
                if (*iter != l && a[*iter] > a[*iter + 1]) {
                  pos[i][l] = *iter;
                  start[i][l] = true;
                  break;
                }
                if (*iter != i + 1 && a[*iter] > a[*iter - 1]) {
                  pos[i][l] = *iter;
                  start[i][l] = false;
                  break;
                }
              }
              dp[l][j + 1] = i;
            }
          }
        }
      }
    }
  }
  if (dp[n][k] == -1) {
    cout << "NO";
  } else {
    cout << "YES" << endl;
    for (int p = n; p; p = dp[p][k + 1]) {
      if (p - dp[p][k] == 1) {
        k--;
        continue;
      }
      int curpos = pos[dp[p][k]][p];
      if (!start[dp[p][k]][p]) {
        cout << curpos << " L" << endl;
        curpos--;
        for (int i = 1; i <= p - 1 - curpos; i++)
          cout << curpos << " R" << endl;
      } else
        for (int i = 1; i <= p - curpos; i++) {
          cout << curpos << " R" << endl;
        }
      for (int t = curpos; t > dp[p][k] + 1; t--) cout << t << " L" << endl;
      k--;
    }
  }
  return 0;
}
