#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 10;
const long long MN = 5e2 + 10;
long long n, m, a[MN], b[MN];
vector<pair<long long, char> > ans;
long long lz = 0;
bool fl = false;
void fail() {
  cout << "NO\n";
  exit(0);
}
long long get(long long l, long long r) {
  long long mx = *max_element(a + l, a + r + 1);
  if (a[l] == mx) {
    fl = true;
    long long ret = l;
    for (; a[ret] == mx; ++ret)
      ;
    return ret - 1;
  }
  long long ret = l;
  for (; a[ret] != mx; ++ret)
    ;
  return ret;
}
int32_t main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (long long i = 0; i < n; ++i) cin >> a[i];
  cin >> m;
  for (long long i = 0; i < m; ++i) cin >> b[i];
  long long cur = 0;
  long long p = 0;
  long long lst = 0;
  for (long long i = 0; i < n; ++i) {
    cur += a[i];
    if (cur == b[p] && p < m) {
      if (i == lst) {
        ++p, cur = 0, lst = i + 1;
        continue;
      }
      if (*max_element(a + lst, a + i + 1) == *min_element(a + lst, a + i + 1))
        fail();
      ++p;
      fl = false;
      long long ind = get(lst, i);
      if (fl) {
        for (long long j = 0; j < (i - ind); ++j)
          ans.push_back(make_pair(ind - lz, 'R'));
        for (long long j = ind - 1; j >= lst; --j) {
          ans.push_back(make_pair(ind - lz, 'L'));
          ++lz;
        }
        lz += (i - ind);
      } else {
        for (long long j = ind - 1; j >= lst; --j) {
          ans.push_back(make_pair(ind - lz, 'L'));
          ++lz;
        }
        for (long long j = 0; j < (i - ind); ++j)
          ans.push_back(make_pair(ind - lz, 'R'));
        lz += i - ind;
      }
      cur = 0;
      lst = i + 1;
    }
  }
  if (cur || p < m) fail();
  cout << "YES\n";
  for (auto v : ans) cout << v.first + 1 << ' ' << v.second << endl;
  return 0;
}
