#include <bits/stdc++.h>
using namespace std;
inline int Set(int N, int pos) { return N = N | (1 << pos); }
inline int Reset(int N, int pos) { return N = N & ~(1 << pos); }
inline bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
template <class T>
T gcd(T a, T b) {
  return (!b) ? a : gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd(a, b)) * b;
}
int a[505], b[505];
vector<pair<int, int> > v;
vector<int> vv;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cin >> k;
  for (int i = 0; i < k; i++) cin >> b[i];
  int s = 0, j = 0, p = 0, f = 1;
  for (int i = 0; i < n; i++) {
    if (s && a[i] != a[i - 1]) f = 0;
    s += a[i];
    if (s == b[j] && (!f || s == a[i])) {
      v.push_back(make_pair(p, i));
      s = 0;
      j++;
      p = i + 1;
      f = 1;
    }
    if (s > b[j]) {
      v.clear();
      break;
    }
  }
  if (v.size() != k) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 0; i < v.size(); i++) {
      int l = v[i].first, r = v[i].second;
      int mx = 0;
      int idx = l;
      for (; l <= r; l++) {
        if (a[l] > mx && ((l > v[i].first && a[l - 1] < a[l]) ||
                          (l < v[i].second && a[l + 1] < a[l]))) {
          mx = a[l];
          idx = l;
        }
      }
      vv.push_back(idx);
    }
    int cr = 0, cr2 = 0;
    for (int i = 0; i < vv.size(); i++) {
      int l = v[i].first, r = v[i].second;
      int l1 = vv[i] - 1, r1 = vv[i] + 1;
      while (1) {
        if (l1 < l && r1 > r) break;
        if ((l1 < l && r1 <= r) || (l1 >= l && r1 <= r && a[l1] > a[r1])) {
          cout << r1 - cr << ' ' << 'R' << endl;
          r1++;
          cr++;
        } else {
          cout << l1 + 2 - cr2 << ' ' << 'L' << endl;
          l1--;
          cr++;
        }
      }
      cr2 = cr;
    }
  }
  return 0;
}
