#include <bits/stdc++.h>
using namespace std;
vector<int> Z(string str) {
  vector<int> z(str.size());
  for (int i = 1; i < str.size(); i++) {
    while (i + z[i] < str.size() && str[z[i]] == str[i + z[i]]) z[i]++;
  }
  return z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long k;
  cin >> k;
  vector<long long> b(k);
  for (long long i = 0; i < k; i++) {
    cin >> b[i];
  }
  vector<pair<long long, char> > ans;
  long long sum = 0;
  long long ma = 0;
  long long ind;
  long long d = 0;
  long long l = n - 1, r = n - 1;
  long long j = k - 1;
  for (long long i = n - 1; i >= 0; i--) {
    sum += a[i];
    bool doit = false;
    if (sum == b[j]) {
      j--;
      doit = true;
      if (j < 0 && i > 0) {
        cout << "NO";
        return 0;
      }
    } else if (sum < b[j]) {
      l--;
      if (j < 0) {
        cout << "NO";
        return 0;
      }
    } else {
      cout << "NO";
      return 0;
    }
    if (ma < a[i]) {
      if (i + 1 <= r && a[i + 1] < a[i]) {
        d = 1;
      }
      if (i - 1 >= l && a[i - 1] < a[i]) {
        d = 1;
      }
      if (d > 0) {
        ind = i;
        ma = a[i];
      }
    }
    if (doit) {
      if (d == 0 && r != l) {
        cout << "NO";
        return 0;
      } else if (r == l) {
        ma = a[i];
        ind = i;
      }
      long long x = ind - 1, y = ind + 1;
      while (ma < sum) {
        for (; x >= l && ma > a[x]; x--) {
          ma += a[x];
          ans.push_back(make_pair(ind + 1, 'L'));
          ind--;
        }
        for (; y <= r && ma > a[y]; y++) {
          ma += a[y];
          ans.push_back(make_pair(ind + 1, 'R'));
        }
      }
      l = i - 1;
      r = i - 1;
      d = 0;
      ma = 0;
      sum = 0;
    }
  }
  cout << "YES" << endl;
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
  return 0;
}
