#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <vector>

using namespace std;

const int size = 2 * 1000;
const int side = 200;

int field[side][side], px[size], py[size], n, m, p, k, cnt, num[size];
vector <int> fc, sc;
vector <char> tp;

bool flag;

void add(int ps, char mv)
{
    tp.push_back(mv);
    fc.push_back(px[ps]);
    sc.push_back(py[ps]);
}


bool move_forward(int ps)
{
    if (px[ps] < n && field[px[ps] + 1][py[ps]] == 0)
    {
        add(ps, 'F');
        field[px[ps]++][py[ps]] = 0;
        field[px[ps]][py[ps]] = 2;
        return true;
    }
    return false;
}

bool move_left(int ps)
{
    int i;
    for (i = px[ps]; i < n; i++)
    {
        if (i != px[ps] && field[i][py[ps]] != 0)
            return false;
        if (field[i + 1][py[ps] - 1] == 1)
        {
            while (px[ps] < i)
                move_forward(ps);
            cnt --;
            add(ps, 'L');
            field[px[ps]++][py[ps]--] = 0;
            field[px[ps]][py[ps]] = 2;
            return true;
        }
    }
    return false;
}

bool move_right(int ps)
{
    int i;
    for (i = px[ps]; i < n; i++)
    {
        if (i != px[ps] && field[i][py[ps]] != 0)
            return false;
        if (field[i + 1][py[ps] + 1] == 1)
        {
            while (px[ps] < i)
            {
                move_forward(ps);
                //fprintf(stderr, "%d %d %d %d\n", px[ps], py[ps], i, field[px[ps] + 1][py[ps]]);
            }
            cnt --;
            add(ps, 'R');
            field[px[ps]++][py[ps]++] = 0;
            field[px[ps]][py[ps]] = 2;
            return true;
        }
    }
    return false;
}

void left_up_sort(int i, int j)
{
    //fprintf(stderr, "here %d %d\n", i, j);
    if (i >= j)
        return;
    int l = i, r = j, k = (i + j) / 2;
    int xk = px[k], yk = py[k];

    //fprintf(stderr, "%d %d %d %d\n", l, r, yk, xk);

    while (l <= r)
    {
        while (py[l] < yk || (py[l] == yk && px[l] < xk))
            l++;
        while (py[r] > yk || (py[r] == yk && px[r] > xk))
            r--;
        if (l <= r)
        {
            swap(px[l], px[r]);
            swap(py[l], py[r]);
            l++;
            r--;
            //swap(num[l++], num[r--]);
        }
    }
    left_up_sort(i, r);
    left_up_sort(l, j);
}

int main()
{
    int i, j, x, y, ps;

    freopen("pawns.in", "r", stdin);
    freopen("pawns.out", "w", stdout);

    scanf("%d%d%d%d", &n, &m, &p, &k);
    for (i = 0; i < p; i++)
    {
        scanf("%d", &y);
        px[i] = 1;
        py[i] = y;
        //num[i] = i;
        field[1][y] = 2;
    }
    for (i = 0; i < k; i++)
    {
        scanf("%d%d", &x, &y);
        field[x][y] = 1;
    }
    flag = true;
    cnt = k;
    while (flag)
    {
        fprintf(stderr,"here\n");
        left_up_sort(0, p - 1);
        fprintf(stderr,"here\n");
        flag = false;
        for (i = 0; i < p; i++)
        {
            if (move_left(i))
            {
                flag = true;
                break;
            }
            fprintf(stderr,"here\n");
            if (move_right(i))
            {
                flag = true;
                break;
            }
            fprintf(stderr,"here\n");
            if (move_forward(i))
            {
                flag = true;
                break;
            }
        }
    }
    if (cnt > 0)
        printf("NO\n");
    else
    {
        printf("YES\n");
        printf("%d\n", tp.size());
        for (i = 0; i < tp.size(); i++)
            printf("%d %d %c\n", fc[i], sc[i], tp[i]);
    }

}
