#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, k, j, m, s = 0, l, r, ma, pos, ele;
  vector<int> v;
  vector<pair<int, char> > ans;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    s += a[i];
  }
  cin >> k;
  int b[k];
  for (i = 0; i < k; i++) {
    cin >> b[i];
    s -= b[i];
  }
  l = 0;
  if (s != 0) {
    cout << "NO" << endl;
    return 0;
  }
  for (int ii = 0; ii < k; ii++) {
    m = b[ii];
    s = 0;
    v.clear();
    for (j = l; j < n && s < m; j++) {
      s += a[j];
      v.push_back(a[j]);
    }
    l = j;
    if (s == m)
      r = j - 1;
    else {
      cout << "NO" << endl;
      return 0;
    }
    while (v.size() != 1) {
      ma = 0;
      pos = 0;
      for (i = 0; i < v.size(); i++) {
        if (v[i] > ma) {
          ma = v[i];
          pos = i;
        }
      }
      int f = 0;
      for (i = pos; i < v.size(); i++) {
        if (v[i] == ma) {
          if (i > 0 && i < (v.size() - 1)) {
            if (ma > v[i - 1]) {
              ele = v[i - 1];
              v.erase(v.begin() + i - 1, v.begin() + i + 1);
              v.insert(v.begin() + i - 1, ma + ele);
              ans.push_back({ii + i + 1, 'L'});
              f = 1;
            } else if (ma > v[i + 1]) {
              ele = v[i + 1];
              v.erase(v.begin() + i, v.begin() + i + 2);
              v.insert(v.begin() + i, ma + ele);
              ans.push_back({ii + i + 1, 'R'});
              f = 1;
            } else {
              ;
            }
          } else if (i > 0) {
            if (ma > v[i - 1]) {
              ele = v[i - 1];
              v.erase(v.begin() + i - 1, v.begin() + i + 1);
              v.insert(v.begin() + i - 1, ma + ele);
              ans.push_back({ii + i + 1, 'L'});
              f = 1;
            } else {
              ;
            }
          } else {
            if (ma > v[i + 1]) {
              ele = v[i + 1];
              v.erase(v.begin() + i, v.begin() + i + 2);
              v.insert(v.begin() + i, ma + ele);
              ans.push_back({ii + i + 1, 'R'});
              f = 1;
            } else {
              ;
            }
          }
          if (f == 1) break;
        }
      }
      if (f == 0) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
  return 0;
}
