#include <bits/stdc++.h>
using namespace std;
vector<pair<int, pair<int, int> > > an;
int main() {
  ios_base::sync_with_stdio(0);
  int i, j, x, n, cnt = 0, m, y, k, g, flg, sm, st, dn;
  vector<int> v;
  cin >> n;
  int a[n + 1];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cin >> m;
  int b[m + 1];
  for (i = 1; i <= m; i++) {
    cin >> b[i];
  }
  x = 1;
  sm = 0;
  for (i = 1; i <= n; i++) {
    sm += a[i];
    if (x > m) {
      cout << "NO";
      return 0;
    }
    if (sm == b[x]) {
      sm = 0;
      x++;
      v.push_back(i);
    } else if (sm > b[x]) {
      cout << "NO";
      return 0;
    }
  }
  if (sm || x <= m) {
    cout << "NO";
    return 0;
  }
  st = 1;
  dn = 0;
  int id;
  pair<int, pair<int, int> > d;
  for (i = 0; i <= v.size() - 1; i++) {
    flg = 0;
    id = 0;
    for (j = st; j <= v[i] - 1; j++) {
      if (a[j] == a[j + 1]) {
        if (flg) {
          x = an.size() - 1;
          an[x].second.second = -1;
          d.first = 3 + dn;
          d.second.first = 2;
          d.second.second = 0;
          an.push_back(d);
          d.first = 2 + dn;
          d.second.first = 2;
          d.second.second = 0;
          an.push_back(d);
          a[j + 1] += a[j];
        } else {
          id++;
        }
      } else if (a[j] > a[j + 1]) {
        flg = 1;
        d.first = 1 + id + dn;
        d.second.first = 1;
        d.second.second = 0;
        an.push_back(d);
        a[j + 1] += a[j];
        x = 0;
        while (id) {
          a[j + 1] += a[j - (++x)];
          d.first = 2 + (--id) + dn;
          d.second.first = 2;
          d.second.second = 0;
          an.push_back(d);
        }
      } else if (a[j] < a[j + 1]) {
        flg = 1;
        d.first = 2 + id + dn;
        d.second.first = 2;
        d.second.second = 0;
        an.push_back(d);
        a[j + 1] += a[j];
        x = 0;
        while (id) {
          a[j + 1] += a[j - (++x)];
          d.first = 2 + (--id) + dn;
          d.second.first = 2;
          d.second.second = 0;
          an.push_back(d);
        }
      }
    }
    if (id) {
      cout << "NO";
      return 0;
    }
    dn++;
    st = v[i] + 1;
  }
  cout << "YES" << endl;
  if (an.size() == 0) return 0;
  for (i = 0; i <= an.size() - 1; i++) {
    d = an[i];
    if (d.second.second == -1) continue;
    cout << d.first << " ";
    if (d.second.first == 1) {
      cout << "R";
    } else
      cout << "L";
    cout << endl;
  }
}
