#include <bits/stdc++.h>
using namespace std;
int max(int a, int b) {
  if (a >= b) return a;
  return b;
}
int max3(int a, int b, int c) { return max(a, max(b, c)); }
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n, k, i;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  scanf("%d", &k);
  long long int b[k];
  for (i = 0; i < k; i++) {
    cin >> b[i];
  }
  i = 0;
  long long int sum = 0;
  int m = 0;
  int g[k];
  while (1) {
    if (m >= k || i >= n) {
      printf("NO\n");
      return 0;
    }
    sum += a[i];
    if (sum > b[m]) {
      printf("NO\n");
      return 0;
    } else if (sum == b[m]) {
      g[m] = i;
      m++;
      sum = 0;
    } else if (sum < b[m] && i == n - 1 && m == k - 1) {
      printf("NO\n");
      return 0;
    }
    if (m == k && i == n - 1) {
      break;
    }
    i++;
    if (i >= n) {
      printf("NO\n");
      return 0;
    }
  }
  g[k - 1] = n - 1;
  int j;
  m = 0;
  int index;
  char dir;
  vector<char> str;
  vector<int> num;
  int st = 0;
  int sz = 0;
  for (j = 0; j < k; j++) {
    vector<long long int> d;
    map<long long int, int> hash;
    for (m = st; m <= g[j]; m++) {
      d.push_back(a[m]);
      hash[a[m]]++;
    }
    while (d.size() > 1) {
      if (hash.size() == 1 && d.size() > 1) {
        printf("NO\n");
        return 0;
      }
      long long int max = d[0];
      int pos = 0;
      for (i = 0; i < d.size(); i++) {
        if (max < d[i]) {
          max = d[i];
          pos = i;
        }
      }
      while (1) {
        if (pos != d.size() - 1 && d[pos + 1] < d[pos]) {
          d[pos + 1] += d[pos];
          index = sz + pos;
          dir = 'R';
          d.erase(d.begin() + pos);
          break;
        } else if (pos != 0 && d[pos - 1] < d[pos]) {
          d[pos - 1] += d[pos];
          index = sz + pos;
          dir = 'L';
          d.erase(d.begin() + pos);
          break;
        } else {
          if (pos == 0) {
            pos++;
          } else if (pos == d.size() - 1) {
            pos--;
          } else {
            pos++;
          }
        }
      }
      num.push_back(index + 1);
      str.push_back(dir);
    }
    st = g[j] + 1;
    sz++;
  }
  printf("YES\n");
  for (i = 0; i < str.size(); i++) {
    cout << num[i] << ' ' << str[i] << endl;
  }
  return 0;
}
