#include <bits/stdc++.h>
using namespace std;
long long A[505], B[505];
int L[505], R[505];
vector<int> Q, tmp;
vector<pair<int, int> > ans;
int main() {
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> A[i];
  int K;
  cin >> K;
  for (int i = 1; i <= K; i++) cin >> B[i];
  int ptr = 1;
  long long sum = 0;
  for (int i = 1; i <= K; i++) {
    L[i] = ptr;
    while (ptr <= N && sum < B[i]) {
      sum += A[ptr];
      ptr++;
    }
    R[i] = ptr - 1;
    if (sum != B[i]) {
      cout << "NO" << endl;
      return 0;
    }
    sum = 0;
  }
  if (ptr <= N) {
    cout << "NO" << endl;
    return 0;
  }
  int prevIndex = 1;
  for (int i = 1; i <= K; i++) {
    if (L[i] == R[i]) {
      prevIndex++;
      continue;
    }
    Q.clear();
    for (int j = L[i]; j <= R[i]; j++) Q.push_back(A[j]);
    while (Q.size() > 1) {
      int maxx = -1, indx = -1, dir = -1;
      for (int j = 0; j < Q.size(); j++) {
        if (j != 0) {
          if (Q[j] > Q[j - 1] && Q[j] + Q[j - 1] > maxx) {
            maxx = Q[j] + Q[j - 1];
            indx = j;
            dir = 0;
          }
        }
        if (j != Q.size() - 1) {
          if (Q[j] > Q[j + 1] && Q[j] + Q[j + 1] > maxx) {
            maxx = Q[j] + Q[j + 1];
            indx = j;
            dir = 1;
          }
        }
      }
      if (maxx == -1) {
        cout << "NO" << endl;
        return 0;
      }
      ans.push_back(make_pair(prevIndex + indx, dir));
      tmp.clear();
      if (dir == 0) {
        for (int j = 0; j < Q.size(); j++) {
          if (j != indx && j != indx - 1)
            tmp.push_back(Q[j]);
          else {
            tmp.push_back(Q[j] + Q[j + 1]);
            j++;
          }
        }
      } else {
        for (int j = 0; j < Q.size(); j++) {
          if (j != indx && j != indx + 1)
            tmp.push_back(Q[j]);
          else {
            tmp.push_back(Q[j] + Q[j + 1]);
            j++;
          }
        }
      }
      Q = tmp;
    }
    prevIndex++;
  }
  cout << "YES\n";
  for (int i = 0; i < ans.size(); i++)
    printf("%d %c\n", ans[i].first, (ans[i].second == 0 ? 'L' : 'R'));
  return 0;
}
