#include <bits/stdc++.h>
using namespace std;
int a[500 + 5], b[500 + 5];
int main() {
  int n, k;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  scanf("%d", &k);
  for (int i = 0; i < k; ++i) scanf("%d", &b[i]);
  int p = 0;
  vector<pair<int, char> > ans;
  for (int j = 0; j < k; ++j) {
    int q = p, cur = 0;
    while (q < n && cur < b[j]) {
      cur += a[q++];
    }
    if (cur != b[j]) {
      puts("NO");
      return 0;
    }
    int mx = 0;
    for (int i = p; i < q; ++i) {
      if (a[i] > mx) mx = a[i];
    }
    bool ok = (q - p == 1);
    for (int i = p; i < q; ++i)
      if (a[i] == mx) {
        if ((i > p && a[i - 1] < a[i])) {
          for (int l = i; l > p; --l) ans.push_back(make_pair(j + l - p, 'L'));
          for (int l = i; l + 1 < q; ++l) ans.push_back(make_pair(j, 'R'));
          ok = true;
          break;
        }
        if ((i + 1 < q && a[i + 1] < a[i])) {
          for (int l = i; l + 1 < q; ++l)
            ans.push_back(make_pair(j + i - p, 'R'));
          for (int l = i; l > p; --l) ans.push_back(make_pair(j + l - p, 'L'));
          ok = true;
          break;
        }
      }
    if (!ok) {
      puts("NO");
      return 0;
    }
    p = q;
  }
  if (ans.size() == (n - k)) {
    puts("YES");
    for (int i = 0; i < ans.size(); ++i) {
      printf("%d %c\n", ans[i].first + 1, ans[i].second);
    }
  } else
    puts("NO");
  return 0;
}
