#include <bits/stdc++.h>
using std::cin;
using std::cout;
int main() {
  int init_q;
  cin >> init_q;
  std::vector<int> monster(init_q);
  for (int i = 0; i < monster.size(); ++i) cin >> monster[i];
  int after_q;
  cin >> after_q;
  std::vector<int> after(after_q);
  for (int i = 0; i < after.size(); ++i) cin >> after[i];
  std::vector<std::pair<int, char> > ans(0);
  for (int i = 0, left = 0, right = left; i < after.size(); ++i) {
    left = right, right = left;
    std::vector<int> segm(0);
    std::set<int> has;
    long long sum = 0;
    int maxi = 0;
    for (; right < monster.size(); ++right) {
      if (sum + monster[right] > after[i]) break;
      sum += monster[right];
      segm.push_back(monster[right]);
      has.insert(monster[right]);
      maxi = std::max(maxi, monster[right]);
    }
    if (sum != after[i]) return cout << "NO", 0;
    if (has.size() == 0) return cout << "NO", 0;
    if (has.size() == 1 and segm.size() > 1) return cout << "NO", 0;
    if (right == monster.size() and (i + 1) < after.size())
      return cout << "NO", 0;
    if (right != monster.size() and (i + 1) == after.size())
      return cout << "NO", 0;
    if (has.size() == 1) continue;
    for (int j = 0; j < segm.size(); ++j) {
      if (segm[j] == maxi) {
        if (j > 0 and segm[j - 1] < segm[j]) {
          for (int k = j; k > 0; --k) ans.push_back({i + k, 'L'});
          for (int k = j + 1; k < segm.size(); ++k) ans.push_back({i, 'R'});
          break;
        } else if (j + 1 < segm.size() and segm[j + 1] < segm[j]) {
          for (int k = j; k + 1 < segm.size(); ++k) ans.push_back({i + j, 'R'});
          for (int k = j; k > 0; --k) ans.push_back({i + k, 'L'});
          break;
        }
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < ans.size(); ++i)
    cout << int(ans[i].first + 1) << ' ' << (char)(ans[i].second) << "\n";
  return 0;
}
