#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int n;
int a[N];
int k;
int b[N];
vector<pair<int, char> > ans;
void done() {
  cout << "NO\n";
  exit(0);
}
void solve(int l, int r, int add) {
  if (r < l) {
    done();
  }
  if (l == r) {
    return;
  }
  int idx = -1;
  int val = -1;
  for (int i = l; i <= r; i++) {
    if (a[i] > val) {
      if ((i > l && a[i - 1] < a[i]) || (i < r && a[i + 1] < a[i])) {
        idx = i;
        val = a[i];
      }
    }
  }
  if (idx == -1) {
    done();
  }
  if (idx < r && a[idx + 1] < a[idx]) {
    for (int i = idx + 1; i <= r; i++) {
      ans.push_back(make_pair(add + idx - l + 1, 'R'));
    }
    for (int i = idx; i > l; i--) {
      ans.push_back(make_pair(add + i - l + 1, 'L'));
    }
  } else {
    for (int i = idx; i > l; i--) {
      ans.push_back(make_pair(add + i - l + 1, 'L'));
    }
    for (int i = idx + 1; i <= r; i++) {
      ans.push_back(make_pair(add + 1, 'R'));
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cin >> k;
  for (int i = 1; i <= k; i++) {
    cin >> b[i];
  }
  int cur = 1;
  for (int i = 1; i <= k; ++i) {
    int sum = b[i];
    int start = cur;
    while (sum > 0) {
      if (cur > n) {
        done();
      }
      sum -= a[cur];
      ++cur;
    }
    if (sum < 0) {
      done();
    }
    solve(start, cur - 1, i - 1);
  }
  if (cur <= n) {
    done();
  }
  cout << "YES\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first << ' ' << ans[i].second << endl;
  }
}
