#include <bits/stdc++.h>
using namespace std;
int A[10010];
int B[10010];
bool check(int st, int ed) {
  int mx = st;
  for (int i = st; i <= ed; i++) {
    if (A[i] > A[mx]) {
      mx = i;
    }
    if (A[i] == A[mx]) {
      if (st <= i - 1 && A[i - 1] < A[i]) mx = i;
      if (i + 1 <= ed && A[i + 1] < A[i]) mx = i;
    }
  }
  bool can = false;
  if (st <= mx - 1 && A[mx - 1] < A[mx]) can = true;
  if (mx + 1 <= ed && A[mx + 1] < A[mx]) can = true;
  return can || (st == ed);
}
void consume(int st, int ed) {
  int mx = st;
  for (int i = st; i <= ed; i++) {
    if (A[i] > A[mx]) {
      mx = i;
    }
    if (A[i] == A[mx]) {
      if (st <= i - 1 && A[i - 1] < A[i]) mx = i;
      if (i + 1 <= ed && A[i + 1] < A[i]) mx = i;
    }
  }
  if (mx + 1 <= ed && A[mx + 1] < A[mx]) {
    for (int i = mx + 1; i <= ed; i++) {
      printf("%d R\n", mx + 1);
    }
    for (int j = mx - 1; j >= st; j--) {
      printf("%d L\n", j + 1 + 1);
    }
  } else if (st <= mx - 1 && A[mx - 1] < A[mx]) {
    for (int j = mx - 1; j >= st; j--) {
      printf("%d L\n", j + 1 + 1);
    }
    for (int i = mx + 1; i <= ed; i++) {
      printf("%d R\n", st + 1);
    }
  }
}
int main() {
  for (;;) {
    int N;
    if (scanf("%d", &N) == EOF) break;
    for (int i = 0; i < N; i++) {
      scanf("%d", &A[i]);
    }
    int M;
    scanf("%d", &M);
    for (int i = 0; i < M; i++) {
      scanf("%d", &B[i]);
    }
    int j = 0;
    int sum = 0;
    bool possible = true;
    vector<int> part;
    part.push_back(-1);
    for (int i = 0; i < N; i++) {
      sum += A[i];
      if (j < M && sum == B[j]) {
        possible &= check(part.back() + 1, i);
        part.push_back(i);
        if (!possible) break;
        sum = 0;
        j += 1;
      }
    }
    if (sum > 0 || j < M) possible = false;
    if (possible) {
      printf("YES\n");
      for (int i = part.size() - 2; i >= 0; i--) {
        consume(part[i] + 1, part[i + 1]);
      }
    } else {
      printf("NO\n");
    }
  }
}
