#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(nullptr);
#define FOR(i,s,n) for(int i = (s); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for(int i = (n); i >= 0; i--)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << '\n';
#define CFYN(n) cout << ( (n) ? "YES":"NO") << '\n';
#define OUT(n) cout << (n) << '\n';
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;

const int HW = 30;
const int Q = 1000;

void out(string s) {
    cout << s << '\n';
    cout.flush();
}

struct route {
    pii xy;
    string r;
};

int main(void)
{
    REP(i,Q) {
        pii s,t;
        cin >> s.first >> s.second >> t.first >> t.second;
        cin.ignore();

        string ans = "";
        if (s.first < t.first) ans += string(t.first-s.first,'D');
        else ans += string(s.first-t.first,'U');
        if (s.second < t.second) ans += string(t.second-s.second,'R');
        else ans += string(s.second-t.second,'L');

        out(ans);
        int score;
        cin >> score;
        cin.ignore();
    }

    return 0;
}
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <map>
using namespace std;

#define debug(x) cerr << #x << '=' << x << '\n'
#define rep(i, b, n) for (int i = b; i <= n; i++)

const int N = 512345;

int mp[2123][2123], h, w, n, m;
pair<int, int> bb[N], blk[N];
bool ilmt[2123][2123][5];

void dfs(int x, int y, const int &d) {
    ilmt[x][y][d] = true;
    if (d == 1 && !ilmt[x][y - 1][d] && mp[x][y - 1]) {
        dfs(x, y - 1, d);
    }
    if (d == 2 && !ilmt[x][y + 1][d] && mp[x][y + 1]) {
        dfs(x, y + 1, d);
    }
    if (d == 3 && !ilmt[x - 1][y][d] && mp[x - 1][y]) {
        dfs(x - 1, y, d);
    }
    if (d == 4 && !ilmt[x + 1][y][d] && mp[x + 1][y]) {
        dfs(x + 1, y, d);
    }
}

int main(void) {
    cin >> h >> w >> n >> m;
    rep (i, 1, h) {
        rep (j, 1, w) {
            mp[i][j] = 1;
        }
    }
    rep (i, 1, n) {
        scanf("%d%d", &bb[i].first, &bb[i].second);
    }
    rep (i, 1, m) {
        scanf("%d%d", &blk[i].first, &blk[i].second);
        mp[blk[i].first][blk[i].second] = 0;
    }
    rep (i, 1, n) {
        dfs(bb[i].first, bb[i].second, 1);
        dfs(bb[i].first, bb[i].second, 2);
        dfs(bb[i].first, bb[i].second, 3);
        dfs(bb[i].first, bb[i].second, 4);
    }
    int ans = 0;
    rep (i, 1, h) {
        rep (j, 1, w) {
            ans += *max_element(ilmt[i][j] + 1, ilmt[i][j] + 5);
        }
    }
    cout << ans;
    return 0;
}