#include <bits/stdc++.h>
using namespace std;
vector<pair<int, char> > res;
vector<int> v;
int n, a[501], k, b[501], id;
int mx() {
  int tmp = 0;
  for (int i = 0; i < v.size(); i++)
    if (v[i] > tmp) tmp = v[i];
  return tmp;
}
void print() {
  for (int i = 0; i < v.size(); i++) cout << v[i] << ' ';
  cout << endl;
}
void prod(int l, int r) {
  v.clear();
  for (int i = l; i <= r; i++) v.push_back(a[i]);
  while (v.size() > 1) {
    int ttt = v.size();
    int now = mx();
    for (int i = 0; i < v.size(); i++) {
      if (v[i] == now) {
        if (i == 0) {
          if (v[i + 1] != now) {
            v[i] += v[i + 1];
            res.push_back(make_pair(id + 1 + i, 'R'));
            v.erase(v.begin() + (i + 1));
            break;
          }
        } else if (i + 1 == v.size()) {
          if (v[i - 1] != now) {
            v[i] += v[i - 1];
            res.push_back(make_pair(id + 1 + i, 'L'));
            v.erase(v.begin() + (i - 1));
            break;
          }
        } else {
          if (v[i - 1] != now) {
            v[i] += v[i - 1];
            res.push_back(make_pair(id + 1 + i, 'L'));
            v.erase(v.begin() + (i - 1));
            break;
          }
          if (v[i + 1] != now) {
            v[i] += v[i + 1];
            res.push_back(make_pair(id + 1 + i, 'R'));
            v.erase(v.begin() + (i + 1));
            break;
          }
        }
      }
    }
    if (ttt == v.size()) {
      printf("NO\n");
      exit(0);
    }
  }
}
int main() {
  scanf("%d", &n);
  int ttmp = 0;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), ttmp += a[i];
  scanf("%d", &k);
  for (int i = 0; i < k; i++) scanf("%d", &b[i]), ttmp -= b[i];
  if (ttmp != 0) return !printf("NO\n");
  if (n == k) {
    for (int i = 0; i < n; i++)
      if (a[i] != b[i]) return !printf("NO\n");
    printf("YES\n");
    return 0;
  }
  int l = 0, r = 0, now = 0;
  while (r < n) {
    while (b[id] > now && r < n) now += a[r], r++;
    if (now != b[id]) return !printf("NO\n");
    prod(l, r - 1);
    l = r;
    id++;
    now = 0;
  }
  printf("YES\n");
  for (int i = 0; i < res.size(); i++)
    printf("%d %c\n", res[i].first, res[i].second);
}
