#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int ret = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') ret = ret * 10 + ch - '0', ch = getchar();
  return ret;
}
int n, k;
int a[505];
int b[505], ed[505];
int matchB(int val, int st) {
  int i;
  for (i = st; val > 0 && i <= n; i++) val -= a[i];
  if (val != 0) return -1;
  return i - 1;
}
vector<pair<int, char> > out;
void solve(int add, int st, int ed) {
  int pos = 0, mx = 0;
  if (st == ed) return;
  for (int i = st; i <= ed; i++) mx = max(mx, a[i]);
  for (int i = st + 1; i < ed; i++)
    if (a[i] == mx && (a[i + 1] != mx || a[i - 1] != mx)) pos = i;
  if (pos == 0) {
    if (a[st] == mx && a[st + 1] != mx)
      pos = st;
    else if (a[ed] == mx && a[ed - 1] != mx)
      pos = ed;
    if (pos == 0) {
      puts("NO");
      exit(0);
    }
  }
  int sum = mx, pl = pos - 1, pr = pos + 1, num = ed - st + 1;
  while (num > 1) {
    if (pl >= st && a[pl] != sum) {
      out.push_back(make_pair(pl + 1 + add, 'L'));
      sum += a[pl];
      pl--;
      num--;
    } else if (pr <= ed && a[pr] != sum) {
      out.push_back(make_pair(pl + 1 + add, 'R'));
      sum += a[pr];
      pr++;
      num--;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= k; i++) {
    ed[i] = matchB(b[i], ed[i - 1] + 1);
    if (ed[i] == -1) return puts("NO"), 0;
  }
  if (ed[k] != n) return puts("NO"), 0;
  for (int i = 1; i <= k; i++) {
    solve(i - (ed[i - 1] + 1), ed[i - 1] + 1, ed[i]);
  }
  puts("YES");
  for (int i = 0, len = out.size(); i < len; i++)
    printf("%d %c\n", out[i].first, out[i].second);
  return 0;
}
