#include <bits/stdc++.h>
using namespace std;
const int N = 500;
int A[N], B[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &A[i]);
  int k;
  scanf("%d", &k);
  for (int i = 0; i < k; i++) scanf("%d", &B[i]);
  long long sum1 = 0;
  long long sum2 = 0;
  for (int i = 0; i < n; i++) sum1 += A[i];
  for (int i = 0; i < k; i++) sum2 += B[i];
  int yes = 1;
  if (sum1 != sum2) {
    yes = 0;
  }
  int done = 0;
  int sum;
  vector<pair<int, int> > V;
  for (int i = 0; i < k && yes; i++) {
    int start = done;
    sum = 0;
    while (sum < B[i]) {
      sum += A[done++];
    }
    int end = done - 1;
    if (sum > B[i]) {
      yes = 0;
      break;
    }
    if (start == end) continue;
    int mx = -1;
    for (int j = start; j <= end; j++) {
      mx = max(mx, A[j]);
    }
    int dir = 0;
    int idx = -1;
    for (int j = start; j <= end; j++) {
      if (A[j] == mx) {
        if (j == start) {
          if (A[j + 1] < mx) {
            idx = j;
            dir = 1;
            break;
          }
        } else if (j == end) {
          if (A[j - 1] < mx) {
            idx = j;
            dir = -1;
            break;
          }
        } else {
          if (A[j - 1] < mx) {
            idx = j;
            dir = -1;
            break;
          } else if (A[j + 1] < mx) {
            idx = j;
            dir = 1;
            break;
          }
        }
      }
    }
    if (dir == 0) {
      yes = 0;
      break;
    }
    V.push_back({idx - start + 1 + i, dir});
    if (dir == -1) {
      idx--;
      end--;
    } else
      end--;
    while (idx > start) {
      V.push_back({idx - start + 1 + i, -1});
      idx--;
      end--;
    }
    while (idx < end) {
      V.push_back({idx - start + 1 + i, 1});
      end--;
    }
  }
  if (yes) {
    printf("YES\n");
    for (int i = 0; i < V.size(); i++) {
      printf("%d %c\n", V[i].first, (V[i].second == -1 ? 'L' : 'R'));
    }
  } else {
    printf("NO\n");
  }
}
