#include <bits/stdc++.h>
using namespace std;
int n, k, a[10005], b[10005], c[10005], rev, p;
char ans[10005][105];
bool solve(int l, int r) {
  if (l == r) return 1;
  int o = -1;
  int m = a[l], pos = l;
  for (int i = l + 1; i <= r; i++) {
    if (a[i] < m && o < 0) o = 0;
    if (a[i] > m) {
      if (o < 0) o = 0;
      m = a[i], pos = i;
    }
    if (a[i] == m) {
      if (i > l && a[i - 1] < m)
        o = 0, pos = i;
      else if (i < r && a[i + 1] < m)
        o = 1, pos = i;
    }
  }
  if (o == -1) return 0;
  if (o == 0) {
    for (int i = pos; i > l; i--) sprintf(ans[p++], "%d L\n", i - rev + 1);
    for (int i = pos; i < r; i++) sprintf(ans[p++], "%d R\n", l - rev + 1);
  } else if (o == 1) {
    for (int i = pos; i < r; i++) sprintf(ans[p++], "%d R\n", pos - rev + 1);
    for (int i = pos; i > l; i--) sprintf(ans[p++], "%d L\n", i - rev + 1);
  }
  return 1;
}
int main() {
  int t = 0, s = 0, c1 = 0, c2 = 0;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), c1 += a[i];
  cin >> k;
  for (int i = 0; i < k; i++) scanf("%d", &b[i]), c2 += b[i];
  if (c1 != c2) {
    cout << "NO";
    return 0;
  }
  int j = 0;
  for (int i = 0; i < n; i++) {
    t += a[i];
    if (t == b[j]) {
      if (!solve(s, i)) {
        cout << "NO";
        return 0;
      }
      rev += i - s;
      s = i + 1;
      j++;
      t = 0;
    }
  }
  if (j != k) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < p; i++) cout << ans[i];
  return 0;
}
