#include <bits/stdc++.h>
using namespace std;
const int maxn = 510;
int arr[maxn], sep[maxn];
struct tag {
  int a, b;
};
void solve(tag t) {
  int a = t.a, b = t.b;
  int st = b;
  for (int i = a; i < b; i++) {
    if (arr[i] > arr[st] || arr[i] == arr[st] && (arr[i] > arr[i + 1] ||
                                                  i > a && arr[i] > arr[i - 1]))
      st = i;
  }
  int stt = st;
  if (st == b || st != a && arr[st] > arr[st - 1]) {
    for (int i = a; i < stt; i++) printf("%d L\n", 1 + st--);
    for (int i = stt; i < b; i++) printf("%d R\n", 1 + st);
  } else {
    for (int i = stt; i < b; i++) printf("%d R\n", 1 + st);
    for (int i = a; i < stt; i++) printf("%d L\n", 1 + st--);
  }
  return;
}
int main() {
  int n, m;
  while (scanf("%d", &n) != EOF) {
    int sum = 0, sn = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", arr + i);
      sum += arr[i];
    }
    scanf("%d", &m);
    for (int i = 0; i < m; i++) {
      scanf("%d", sep + i);
      sum -= sep[i];
    }
    bool fail = 0;
    if (sum != 0) fail = 1;
    stack<tag> ss;
    for (int i = 0, p = 0; i < n; i++) {
      sum += arr[i];
      if (sum > sep[p]) {
        fail = 1;
      }
      if (fail) break;
      if (sum == sep[p]) {
        tag t;
        t.b = i;
        t.a = sn;
        if (sn != i) {
          fail = 1;
          for (int j = t.a; j < t.b; j++)
            if (arr[j] != arr[j + 1]) {
              fail = 0;
              break;
            }
          ss.push(t);
        }
        sn = i + 1;
        sum = 0;
        p++;
      }
      if (fail) break;
    }
    if (fail)
      puts("NO");
    else {
      puts("YES");
      while (!ss.empty()) {
        tag temp = ss.top();
        ss.pop();
        solve(temp);
      }
    }
  }
  return 0;
}
