import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.function.BiFunction;
import java.util.function.Function;

public class Main {

    public static void main(String[] args) {
        int sx = sc.nextInt();
        int sy = sc.nextInt();
        int tx = sc.nextInt();
        int ty = sc.nextInt();
        int x = tx-sx;
        int y = ty-sy;
        for (int i=0;i<x;i++)System.out.print('R');
        for (int i=0;i<y;i++)System.out.print('U');
        for (int i=0;i<x;i++)System.out.print('L');
        for (int i=0;i<=y;i++)System.out.print('D');
        for (int i=0;i<=x;i++)System.out.print('R');
        for (int i=0;i<y;i++)System.out.print('U');
        System.out.print("LU");
        for (int i=0;i<=x;i++)System.out.print('L');
        for (int i=0;i<=y;i++)System.out.print('D');
        System.out.print('R');
    }

    public static final long MOD = 1000000007L;
    public static final int tenE9 = 1000000000;
    public static final int INF = Integer.MAX_VALUE/2;
    public static final int dataDigit = 10000;
    static Basic basic = new Basic();
    static FastScanner sc = new FastScanner();
    public static class FastScanner {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;
        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            }else{
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }
        private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
        private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
        public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
        public String next() {
            if (!hasNext()) throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while(isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }
        public long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while(true){
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                }else if(b == -1 || !isPrintableChar(b)){
                    return minus ? -n : n;
                }else{
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }
        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
            return (int) nl;
        }
        public double nextDouble() { return Double.parseDouble(next());}
    }
    public static class Basic {
        //math
        private final int MAX = 51*dataDigit;
        private final long MOD = Main.MOD;
        private final long[] fac = new long[MAX];
        private final long[] finv = new long[MAX];
        private final long[] inv = new long[MAX];
        public long factorial(long num) {
            if (num < 2) return 1;
            else return num * factorial(num - 1);
        }//階乗
        public long modFactorial(long num) {
            if (num < 2) return 1;
            else return num*modFactorial(num-1)%MOD;
        }//余り階乗
        public double log(double base, double antilogarithm) {
            return Math.log(antilogarithm) / Math.log(base);
        }//対数
        public long gcd(long x, long y) {
            if (y == 0) return x;
            else return gcd(y, x % y);
        }//最大公約数
        public long lcm(long x, long y) {
            return x / gcd(x, y) * y;
        }//最小公倍数
        public HashMap<Long, Long> factorization(long num) {
            HashMap<Long, Long> hash = new HashMap<>();
            long n = num;
            long count = 2;
            while (n > 1) {
                while (n % count == 0) {
                    n /= count;
                    if (hash.containsKey(count)) hash.put(count, hash.get(count) + 1);
                    else hash.put(count, 1L);
                }
                count++;
            }
            return hash;
        }//素因数分解
        public int sum(int[] num) {
            int ans = 0;
            for (int j : num) {
                ans += j;
            }
            return ans;
        }//総和
        public int[] reduce(int small, int big) {
            int ins = 2;
            while (ins <= small) {
                if (small % ins == 0 && big % ins == 0) {
                    small /= ins;
                    big /= ins;
                    ins = 2;
                } else {
                    ins++;
                }
            }
            return new int[]{small, big};
        }//約分
        public int reduceCount(int small, int big) {
            int ins = 2;
            int ans = 0;
            while (ins <= small) {
                if (small % ins == 0 && big % ins == 0) {
                    small /= ins;
                    big /= ins;
                    ins = 2;
                    ans++;
                } else {
                    ins++;
                }
            }
            return ans;
        }//約分回数
        public long modPow(long a, long n, long mod) {
            long res = 1;
            while (n > 0) {
                if ((n & 1) != 0) res = res * a % mod;
                a = a * a % mod;
                n >>= 1;
            }
            return res;
        }
        public long pow(long a, long n) {
            long res = 1;
            while (n > 0) {
                if ((n & 1) != 0) res = res * a;
                a = a * a;
                n >>= 1;
            }
            return res;
        }
        public long modInv(long a, long mod) {
            return modPow(a, mod - 2, mod);
        }//単位元は素数であることが必須。
        public void dataInit() {
            fac[0] = 1;
            fac[1] = 1;
            finv[0] = 1;
            finv[1] = 1;
            inv[1] = 1;
            for (int i = 2; i < MAX; i++) {
                fac[i] = fac[i - 1] * i % MOD;
                inv[i] = MOD - inv[(int)(MOD % i)] * (MOD / i) % MOD;
                finv[i] = finv[i - 1] * inv[i] % MOD;
            }
        }
        public long combination(int n, int k) {
            if (n < k) return 0;
            if (n < 0 || k < 0) return 0;
            return fac[n] * (finv[k] * finv[n-k]%MOD)% MOD;
        }
        public long permutation(int n, int k){
            return fac[n]*finv[n-k]%MOD;
        }
        public long hCOM(int n, int k) {
            return combination(n + k - 1, k);
        }
        public boolean[] getIsPrimeArray(int max){
            boolean[] ret = new boolean[max+1];
            Arrays.fill(ret,true);
            ret[0]=false;
            ret[1]=false;
            for (int i=2;i<=max;i++){
                if (ret[i]){
                    int c = 2*i;
                    while (c<=max){
                        ret[c]=false;
                        c+=i;
                    }
                }
            }
            return ret;
        }
        public int digits(long n) {
            return String.valueOf(n).length();
        }
        public boolean isPrime(int N) {
            if(N <= 1)
                return false;
            else if(N == 2)
                return true;
            for(int i = 2; i <= Math.sqrt(N); i++)
                if(N % i == 0)
                    return false;
            return true;
        }
        public long modInvert(long a, long m){
            long b = m;
            long u = 1;
            long v = 0;
            while (b!=0){
                long t = a/b;
                a-=t*b;
                long c = a;
                a=b;
                b=c;
                u-=t*v;
                c=u;
                u=v;
                v=c;
            }
            u%=m;
            if (u<0)u+=m;
            return u;
        }//単位元が素数でなくても可能。a,mは互いに素であることが必須。得られる逆元は最小値。より高速。
        public long ceil_pow2(long n){
            long x = 0;
            while (1L<<x<n)x++;
            return x;
        }

        //array
        public int[] remove(int[] ar, int pos) {
            int[] ret = new int[ar.length - 1];
            for (int i = 0; i < pos; i++) ret[i] = ar[i];
            for (int i = pos + 1; i < ar.length; i++) ret[i - 1] = ar[i];
            return ret;
        }
        public int[] nextArray(int size,int cons){
            int[] ret = new int[size];
            for (int i=0;i<size;i++)ret[i]=sc.nextInt()+cons;
            return  ret;
        }
        public int[] reverse(int[] ar){
            int[] ret = new int[ar.length];
            for (int i=0;i<ar.length;i++){
                ret[i]=ar[ar.length-1-i];
            }
            return ret;
        }
        public long[] cumulative_sum(int[] ar){
            long[] ret = new long[ar.length+1];
            ret[0]=0;
            for (int i=0;i<ar.length;i++)ret[i+1]=ret[i]+ar[i];
            return ret;
        }
        public int median(int[] a) {
            Arrays.sort(a);
            if(a.length % 2 == 1)
                return a[a.length/2];
            else
                return (a[a.length/2-1] + a[a.length/2]) / 2;
        }
        public int binarySearch(int[] array, int target) {
            int pos = -1;
            int left = 0;
            int right = array.length - 1;
            int middle;
            while (pos == -1 && left <= right) {
                middle = (left + right) / 2;
                if (array[middle] == target) pos = middle;
                else if (array[middle] > target) right = middle - 1;
                else left = middle + 1;
            }
            return pos;
        }
        public int lowerBound(int[] a, int key) {
            if(a[a.length-1] < key)
                return a.length;
            int lb = 0, ub = a.length-1, mid;
            do {
                mid = (ub+lb)/2;
                if(a[mid] < key)
                    lb = mid + 1;
                else
                    ub = mid;
            }while(lb < ub);
            return ub;
        }
        public int upperBound(int[] a, int key) {
            if(a[a.length-1] <= key)
                return a.length;
            int lb = 0, ub = a.length-1, mid;
            do {
                mid = (ub+lb)/2;
                if(a[mid] <= key)
                    lb = mid + 1;
                else
                    ub = mid;
            }while(lb < ub);
            return ub;
        }
        public int count(int[] a, int key) {
            return upperBound(a, key) - lowerBound(a, key);
        }
        public List<String> Permutation = new ArrayList<>();
        public void initPermutation(){Permutation.clear();}
        public void permutationList(String q, String ans){
            if(q.length() <= 1) {
                Permutation.add(ans + q);
            }
            else {
                for (int i = 0; i < q.length(); i++) {
                    permutationList(q.substring(0, i) + q.substring(i + 1), ans + q.charAt(i));
                }
            }
        }
        public Comparator<String> dictionarySort = new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {
                int ret = 0;
                int p = 0;
                int min = Math.min(o1.length(),o2.length());
                boolean b = true;
                while (b&&p<min){
                    if (o1.charAt(p)<o2.charAt(p)){
                        ret=-1;
                        b=false;
                    }else if (o1.charAt(p)>o2.charAt(p)){
                        ret=1;
                        b=false;
                    }
                    p++;
                }
                if (ret==0){
                    if (o1.length()<o2.length())ret=-1;
                    else if (o1.length()>o2.length())ret=1;
                }
                return ret;
            }
        };
        public int[] forEach(int[] array, ArrayReplace ar){
            int[] ret = new int[array.length];
            for (int i=0;i<array.length;i++)ret[i]=ar.replace(i);
            return ret;
        }
        //graph
        public void warshall_floyd(int[][] d) {
            int n = d.length;
            for (int k = 0; k < n; k++)
                for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) d[i][j] = Math.min(d[i][j], d[i][k] + d[k][j]);
        }//隣接行列が引数。辺が無い場合、INFを入力。
        public int[] bellman_ford(int[][] d, int size, int start){
            int e = d.length;
            int[] ans = new int[size];
            Arrays.fill(ans,Integer.MAX_VALUE);
            ans[start]=0;
            for (int i=0;i<size;i++){
                for (int[] a : d) {
                    if (ans[a[1]] > ans[a[0]] + a[2]) {
                        ans[a[1]] = ans[a[0]] + a[2];
                        if (i == size - 1) {
                            System.out.println("negative loop");
                            break;
                        }
                    }
                }
            }
            return ans;
        }//辺を配列の要素として管理。
        public interface ArrayReplace{
            int replace(int num);
        }
    }
    public static class Queue<T>{
        private final int max = 10000000;
        private final T[] queue = (T[]) new Object[max];
        private int tail = 0; private int head = 0;
        public void init(){this.head = 0; tail = 0;}
        public boolean isEmpty(){return (head==tail);}
        public boolean isFull(){return (head == (tail+1)%max);}
        public void enqueue(T v){
            if (isFull()){
                System.out.println("error: queue is full.");
                return;
            }
            queue[tail++] = v;
            if (tail == max) tail = 0;
        }
        public T dequeue(){
            if (isEmpty()){
                System.out.println("error: queue is empty");
                return null;
            }
            T res = queue[head];
            ++head;
            if (head == max) head = 0;
            return res;
        }
    }
    public static class Deque<T>{
        private final int max = 10000000;
        private final T[] queue = (T[]) new Object[max];
        private int tail = 0; private int head = 0;
        public void init(){this.head = 0; tail = 0;}
        public boolean isEmpty(){return (head==tail);}
        public boolean isFull(){
            return (head == (tail+1)%max);
        }
        public void pushFirst(T v){
            if (isFull()){
                System.out.println("error: queue is full.");
                return;
            }
            head--;
            if (head==-1)head=max-1;
            queue[head] = v;
        }
        public void pushLast(T v){
            if (isFull()){
                System.out.println("error: queue is full.");
                return;
            }
            queue[tail++] = v;
            if (tail == max) tail = 0;
        }
        public T popFirst(){
            if (isEmpty()){
                System.out.println("error: queue is empty");
                return null;
            }
            T res = queue[head];
            ++head;
            if (head == max) head = 0;
            return res;
        }
        public T popLast(){
            if (isEmpty()){
                System.out.println("error: queue is empty");
                return null;
            }
            if (--tail==-1)tail=max-1;
            return queue[tail];
        }

        public T peekFirst(){
            if (isEmpty()){
                System.out.println("error: queue is empty");
                return null;
            }
            return queue[head];
        }
        public T peekLast(){
            if (isEmpty()){
                System.out.println("error: queue is empty");
                return null;
            }
            return queue[tail];
        }
    }
    public static class Stack<T>{
        private final int max = 1000000;
        private final T[] stack =(T[]) new Object[max];
        private int top = 0;
        public boolean isEmpty(){return (top==0);}
        public boolean isFull(){return (top==max);}
        public void init(){top=0;}
        public void push(T v){
            if (isFull()){
                System.out.println("error: stack is full.");
                return;
            }
            stack[top++] = v;
        }
        public T pop(){
            if (isEmpty()){
                System.out.println("error: stack is empty");
                return null;
            }
            return stack[--top];
        }
        public T peek(){
            if (isEmpty()){
                System.out.println("error: stack is empty");
                return null;
            }
            return stack[top];
        }
    }
    public static class Pair<K,V>{
        private K A;
        private V B;
        Pair(K a,V b){
            A=a;
            B=b;
        }
        public void changeA(K a){A=a;}
        public void changeB(V b){B=b;}
        public void changeAB(K a,V b){A=a;B=b;}
        public static Comparator numberSortWithA = new Comparator() {
            @Override
            public int compare(Object o1, Object o2) {
                Pair p = (Pair)o1;
                Pair q = (Pair)o2;
                if ((int)p.A<(int)q.A)return -1;
                else if ((int)p.A==(int)q.A){
                    if ((int)p.B<(int)q.B)return -1;
                    else if ((int)p.B==(int)q.B)return 0;
                    else return 1;
                }
                else return 1;
            }
        };
        public static Comparator numberSortWithB = new Comparator() {
            @Override
            public int compare(Object o1, Object o2) {
                Pair p = (Pair)o1;
                Pair q = (Pair)o2;
                if ((int)p.B<(int)q.B)return -1;
                else if ((int)p.B==(int)q.B){
                    if ((int)p.A<(int)q.A)return -1;
                    else if ((int)p.A==(int)q.A)return 0;
                    else return 1;
                }
                else return 1;
            }
        };
    }
    public static class Graph{
        final HashMap<Integer,HashSet<Integer>> graph = new HashMap<>();
        final int Size;
        Graph(int size){
            for (int i=0;i<size;i++)graph.put(i,new HashSet<>());
            Size = size;
        }

        public void addEdge(int node1,int node2){
            if (graph.containsKey(node1)&&graph.containsKey(node2)){
                graph.get(node1).add(node2);
                graph.get(node2).add(node1);
            }
        }
        public void addDirectEdge(int from,int to){
            if (graph.containsKey(from)&&graph.containsKey(to)){
                graph.get(from).add(to);
            }
        }
        public int[] depth(int root){
            Queue<Integer> q = new Queue<>();
            q.enqueue(root);
            boolean[] seen = new boolean[Size];
            Arrays.fill(seen, false);
            seen[root]=true;
            int[] depth = new int[Size];
            Arrays.fill(depth,-1);
            depth[root]=0;
            while (!q.isEmpty()){
                int v = q.dequeue();
                for (int u : graph.get(v)){
                    if (!seen[u]){
                        seen[u]=true;
                        q.enqueue(u);
                        depth[u]=depth[v]+1;
                    }
                }
            }
            return depth;
        }
        public HashSet<Integer> getConnected(int pos){return graph.get(pos);}
        public boolean isConnected(int from,int to){return graph.get(from).contains(to);}
        public int diameter(){
            int[] f = depth(0);
            int m = Arrays.stream(f).max().getAsInt();
            int n = basic.binarySearch(f,m);
            int[] s = depth(n);
            return Arrays.stream(s).max().getAsInt();
        }

    }
    public static class Tree extends Graph{
        ArrayList<ArrayList<Integer>> parent;
        ArrayList<Integer> dist;
        Tree(int size) {
            super(size);
            parent = new ArrayList<>();
            dist = new ArrayList<>();
        }
        void initLCA(int root){
            int V = super.Size;
            int K = 1;
            while ((1<<K)<V)K++;
            for (int i=0;i<K;i++){
                ArrayList<Integer> a = new ArrayList<>();
                for (int j=0;j<V;j++)a.add(-1);
                parent.add(a);
            }
            for (int i=0;i<V;i++)dist.add(-1);
            dfs(root,-1,0);
            for (int k=0;k+1<K;k++){
                for (int v=0;v<V;v++){
                    if (parent.get(k).get(v)<0){
                        parent.get(k+1).set(v,-1);
                    }else {
                        parent.get(k+1).set(v,parent.get(k).get(parent.get(k).get(v)));
                    }
                }
            }

        }
        void dfs(int v, int p, int d){
            parent.get(0).set(v,p);
            dist.set(v,d);
            for (int e :super.graph.get(v)){
                if (e!=p)dfs(e,v,d+1);
            }
        }
        int queryLCA(int U, int V){
            int u = U;
            int v = V;
            if (dist.get(u)<dist.get(v)){
                int y = u;u=v;v=y;
            }
            int K = parent.size();
            for (int k=0;k<K;k++){
                if ((((dist.get(u)-dist.get(v))>>k)&1)!=0)u=parent.get(k).get(u);
            }
            if (u==v)return u;
            for (int k=K-1;k>=0;k--){
                if (!Objects.equals(parent.get(k).get(u), parent.get(k).get(v))){
                    u=parent.get(k).get(u);
                    v=parent.get(k).get(v);
                }
            }
            return parent.get(0).get(u);
        }
        HashSet<Integer> leaf(){
            HashSet<Integer> ret = new HashSet<>();
            int[] p = new int[super.Size];
            for (int i=0;i<p.length;i++){
                p[parent.get(0).get(i)]++;
            }
            for (int i=0;i<p.length;i++)if (p[i]==0)leaf().add(i);
            return ret;
        }
    }
    public static class WeightedGraph{
        private final HashMap<Integer,HashMap<Integer,Integer>> graph = new HashMap<>();
        private final int Size;
        private long[] Depth;
        WeightedGraph(int size){
            for (int i=0;i<size;i++)graph.put(i,new HashMap<>());
            Size = size;
        }

        public void addEdge(int node1,int node2,int weight){
            if (graph.containsKey(node1)&&graph.containsKey(node2)){
                graph.get(node1).put(node2,weight);
                graph.get(node2).put(node1,weight);
            }
        }
        public void addDirectEdge(int from,int to,int weight){
            if (graph.containsKey(from)&&graph.containsKey(to)){
                graph.get(from).put(to,weight);
            }
        }
        public int[] dijkstra(int root){
            Comparator<int[]> c = new Comparator<int[]>() {
                @Override
                public int compare(int[] o1, int[] o2) {
                    return Integer.compare(o1[1], o2[1]);
                }
            };
            PriorityQueue<int[]> q = new PriorityQueue<>(c);
            q.add(new int[]{root,0});
            int[] ret = new int[Size];
            Arrays.fill(ret,Integer.MAX_VALUE);
            ret[root]=0;
            while (!q.isEmpty()){
                int[] v = q.poll();
                if (v[1]<=ret[v[0]]){
                    HashMap<Integer,Integer> h = graph.get(v[0]);
                    for (int u : h.keySet()){
                        if (ret[u]>v[1]+h.get(u)){
                            ret[u]=v[1]+h.get(u);
                            q.add(new int[]{u,ret[u]});
                        }
                    }
                }
            }
            return ret;
        }

        public long[] Depth(int root){
            Queue<Integer> q = new Queue<>();
            q.enqueue(root);
            boolean[] seen = new boolean[Size];
            Arrays.fill(seen, false);
            seen[root]=true;
            long[] depth = new long[Size];
            depth[root]=0;
            while (!q.isEmpty()){
                int v = q.dequeue();
                for (int u : graph.get(v).keySet()){
                    if (!seen[u]){
                        seen[u]=true;
                        q.enqueue(u);
                        depth[u]=depth[v]+graph.get(v).get(u);
                    }
                }
            }
            Depth = depth.clone();
            return depth;
        }

    }
    public static class UnionFindTree{
        int[] parent;
        int[] rank;
        int[] Size;
        int Number;
        public UnionFindTree(int size){
            this.parent = new int[size];
            this.rank = new int[size];
            this.Size = new int[size];
            makeSet();
        }
        public void makeSet(){
            for (int i=0;i<Size.length;i++){
                parent[i]=i;
                rank[i]=0;
                Size[i]=1;
            }
            Number= Size.length;
        }
        public void unite(int x, int y){
            int xRoot = find(x);
            int yRoot = find(y);
            if (rank[xRoot]>rank[yRoot]){
                parent[yRoot] = xRoot;
                Size[xRoot]+=Size[yRoot];
                Number--;
            }else if (rank[xRoot]<rank[yRoot]){
                parent[xRoot] = yRoot;
                Size[yRoot]+=Size[xRoot];
                Number--;
            }else if (xRoot!=yRoot){
                parent[yRoot] = xRoot;
                rank[xRoot]++;
                Size[xRoot]+=Size[yRoot];
                Number--;
            }
        }
        public int find(int i){
            if (i!= parent[i]){
                parent[i]=find(parent[i]);
            }
            return parent[i];
        }
        public boolean same(int x, int y){
            return find(x) == find(y);
        }
        public int getSize(int i){return Size[find(i)];}
        boolean isConnected(){
            return Number<2;
        }
        ArrayList<Integer> roots(){
            ArrayList<Integer> set = new ArrayList<>();
            for (int i=0;i<parent.length;i++){
                if (i==parent[i])set.add(i);
            }
            return set;
        }
    }
    public static class BitSearch<T>{
        T[] Array;
        int Width;
        int Length;
        BitSearch(T[] t, int width){
            Array = t;
            Width = width;
            Length = Array.length;
        }
        void start(){
            long max = (long)Math.pow(Width,Length);
            for (long i=0;i<max;i++){
                StringBuilder s = new StringBuilder(Long.toString(i, Width));
                while (s.length()<Length) s.insert(0, "0");
                run(s);
            }
        }
        void run(StringBuilder s){

        }
    }
    public static class SegTree{
        private int n = 0;
        private final long[] d;
        private final BiFunction<Long,Long,Long> op;
        private final long e;
        private final int Size;
        private final long Log;
        SegTree(int N,BiFunction<Long,Long,Long> OP,long E){
            n=N;
            op=OP;
            e=E;
            long log = basic.ceil_pow2(N);
            Log=log;
            int size = 1<<log;
            d =new long[2*size];
            Arrays.fill(d, e);
            Size=size;
        }
        SegTree(int N, long[] S, BiFunction<Long,Long,Long> OP,long E){
            n=N;
            op=OP;
            e=E;
            long log = basic.ceil_pow2(N);
            int size = 1<<log;
            d =new long[2*size];
            Log=log;
            Arrays.fill(d, e);
            if (n >= 0) System.arraycopy(S, 0, d, size, n);
            for (int i=size-1;i>=1;i--){
                update(i);
            }
            Size=size;
        }
        void set(int p,long x){
            p += Size;
            d[p] = x;
            for (int i = 1; i <= Log; i++) update(p >> i);
        }
        long get(int p){return d[p+Size];}
        long prod(int l,int r){
            long sml = e,smr=e;
            l+=Size;
            r+=Size;
            while (l<r){
                if ((l&1)!=0)sml=op.apply(sml,d[l++]);
                if ((r&1)!=0)smr=op.apply(d[--r],smr);
                l>>=1;
                r>>=1;
            }
            return op.apply(sml,smr);
        }
        long all_prod(){return d[1];}
        int max_right(int l, Function<Long,Boolean> f){
            if (l==n)return n;
            l+= Size;
            long sm = e;
            do {
                while (l%2==0)l>>=1;
                if (!f.apply(op.apply(sm,d[l]))){
                    while (l<Size){
                        l*=2;
                        if (f.apply(op.apply(sm,d[l]))){
                            sm= op.apply(sm,d[l]);
                            l++;
                        }
                    }
                    return l-Size;
                }
                sm= op.apply(sm,d[l]);
                l++;
            }while ((l&-l)!=l);
            return n;
        }
        int min_left(int r,Function<Long,Boolean> f){
            if (r==0)return 0;
            r+=Size;
            long sm=e;
            do {
                r--;
                while (r>1&&(r%2)!=0)r>>=1;
                if (!f.apply(op.apply(d[r],sm))){
                    while (r<Size){
                        r=r*2+1;
                        if (f.apply(op.apply(d[r],sm))){
                            sm= op.apply(d[r],sm);
                            r--;
                        }
                    }
                    return r+1-Size;
                }
                sm= op.apply(d[r],sm);
            }while ((r&-r)!=r);
            return 0;
        }
        private void update(int k){
            d[k]=op.apply(d[2*k],d[2*k+1]);
        }
    }

}


import java.util.*;
import java.io.*;

public class HelloWorld{

     public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        int sx = scanner.nextInt();
        int sy =scanner.nextInt();
        int tx = scanner.nextInt();
        int ty =scanner.nextInt();

        int y = ty- sy;
        int x = tx - sx;

        for(int i=0;i<y;i++)
         System.out.print("U");

        for(int i=0;i<x;i++)
        System.out.print("R");

         for(int i=0;i<y;i++)
         System.out.print("D");

        for(int i=0;i<=x;i++)
        System.out.print("L");

        for(int i=0;i<=y;i++)
         System.out.print("U");

        for(int i=0;i<=x;i++)
        System.out.print("R");

         System.out.print("D");

         System.out.print("R");

           for(int i=0;i<=y;i++)
         System.out.print("D");

          for(int i=0;i<=x;i++)
        System.out.print("L");

        System.out.print("U");

     }
}


import java.util.*;

public class Main {
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		int sx=sc.nextInt();
		int sy=sc.nextInt();
		int tx=sc.nextInt();
		int ty=sc.nextInt();
		int i;
		for(i=0;i<ty;i++) System.out.print("U");
		for(i=0;i<tx;i++) System.out.print("R");
		for(i=0;i<ty;i++) System.out.print("D");
		for(i=0;i<tx;i++) System.out.print("L");

		System.out.print("L");
		for(i=0;i<=ty;i++) System.out.print("U");
		for(i=0;i<=tx;i++) System.out.print("R");
		System.out.print("D");

		System.out.print("R");
		for(i=0;i<=ty;i++) System.out.print("D");
		for(i=0;i<=tx;i++) System.out.print("L");
		System.out.print("U");

	}

}


#include<iostream>
#include<string>

using namespace std;
using ll = long long;

int sx, sy, tx, ty;

void input(){
  cin >> sx >> sy >> tx >> ty;
}

string first_time(){
  string s;
  int y = ty - sy;
  int x = tx - sx;
  for(int i = 0; i < y; ++i){
    s.append("U");
  }
  for(int i = 0; i < x; ++i){
    s.append("R");
  }
  for(int i = 0; i < y; ++i){
    s.append("D");
  }
  for(int i = 0; i < x; ++i){
    s.append("L");
  }
  return s;
}

string second_time(){
  string s;
  int y = ty - sy;
  int x = tx - sx;
  s.append("L");
  for(int i = 0; i <= y; ++i){
    s.append("U");
  }
  for(int i = 0; i <= x; ++i){
    s.append("R");
  }
  s.append("D");
  s.append("R");
  for(int i = 0; i <= y; ++i){
    s.append("D");
  }
  for(int i = 0; i <= x; ++i){
    s.append("L");
  }
  s.append("U");
  return s;
}

int main(){
  input();
  cout << first_time() << second_time() << endl;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<string>
#include<iostream>
#include<vector>
#include<cstdlib>
#include<stdio.h>
#include<cmath>
#include<limits>
#include<iomanip>

using namespace std;

template <class T> using V = vector<T>;

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

const long long INF = 1LL << 60;

using ll = long long;
using db = long double;
using st = string;
using ch = char;
using bl = bool;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
using vbl = V<bl>;
using graph = V<V<int>>;
using pq = priority_queue<ll>;

#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>=(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define pb(a) push_back(a);

ll Sum(ll n) {
ll m=0;
  while(n){
    m+=n%10;
    n/=10;
  }
  return m;
}

const int MAX = 510000;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

void Comuse() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

#define comuse Comuse()

ll combi(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll perm(int n,int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] % MOD) % MOD;
}

ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}

vll div(ll n){
  vll ret;
  for(ll i=1;i*i<=n;i++){
    if(n%i==0){
      ret.push_back(i);
      if(i*i!=n){
        ret.push_back(n/i);
      }
    }
  }
  SORT(ret);
  return (ret);
}

ll modpow(ll a,ll n,ll mod){
  ll ans=1;
  while(n>0){
    if(n&1){
      ans=ans*a%mod;
    }

    a=a*a%mod;

    n>>=1;
  }

  return ans;
}

void Solve();

const int MAX_N = 131072;
//segment tree
int NN;
int seg[MAX_N*2-1];
void seguse(){
  for(int i=0;i<2*NN-1;i++){
    seg[i]=INT_MAX;
  }
}

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<setprecision(20)<<fixed;
  Solve();
}

/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  |
\****************************************/
//segtreeの葉の先頭の添え字はn-1
void Solve(){
  //vll segtree(524287);
  //ll N=262144;
  ll sx,sy,tx,ty;
    cin>>sx>>sy>>tx>>ty;
  string a(ty-sy,'U');
  cout<<a;
  string b(tx-sx,'R');
  cout<<b;
  string c(ty-sy,'D');
  cout<<c;
  string d(tx-sx+1,'L');
  cout<<d;
  string e(ty-sy+1,'U');
  cout<<e;
  string f(tx-sx+1,'R');
  cout<<f;
  cout<<"DR";
  string g(ty-sy+1,'D');
  cout<<g;
  string h(tx-sx+1,'L');
  cout<<h;
  cout<<"U\n";
}


#include <vector>
#include <math.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <iomanip>
#include <deque>
#include <map>

typedef long long ll;
#define rep(i, a, n) for(int i = a; i<n; i++)
#define ALL(a) begin(a), end(a)
#define mii map<int, int>
#define msi map<string, int>
#define vi vector<int>
#define vl vector<ll>
#define MOD 1000000007
#define INF 1e9
#define showVector(v) rep(i,0,v.size()){p(v[i]);p(" ")} pl("")
#define p(s) std::cout << s ;
#define pl(s)  std::cout << s << endl;
using namespace std;

// 素数判定 O(√n)
bool is_prime(int n){
    for(int i = 2; i * i <= n; i++){
        if(n % i == 0) return false;
    }
    return true;
}

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;

}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
int main() {
    int sx, sy, tx, ty;
    cin >> sx >> sy >> tx >> ty;
    int dx = tx - sx, dy = ty - sy;
    string res = "";
    rep(i, 0, dx) res += "R";
    rep(i, 0, dy) res += "U";
    rep(i, 0, dx) res += "L";
    rep(i, 0, dy) res += "D";

    res += "D";
    rep(i, 0, dx+1) res += "R";
    rep(i, 0, dy+1) res += "U";
    res += "L";
    res += "U";
    rep(i, 0, dx+1) res += "L";
    rep(i, 0, dy+1) res += "D";
    res += "R";
    cout << res << endl;
    return 0;
}


#include <bits/stdc++.h>
#define INF 1e9
#define INFLL 1ull<<60u
using namespace std;

#define REPR(i,n) for(int i=(n); i >= 0; --i)
#define FOR(i, m, n) for(int i = (m); i < (n); ++i)
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define ALL(a)  (a).begin(),(a).end()
#define endl "\n"

template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
typedef long long ll;

const int MAX_SIZE = 2003;

void solve() {
    vector<vector<bool>> visited(MAX_SIZE,vector<bool>(MAX_SIZE,false));
    int dx[4] = {0,0,1,-1};
    int dy[4] = {1,-1,0,0};
    char dir[4] = {'U','D','R','L'};
    pair<int,int> s,t;
    int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty;
    sx += 1001; sy += 1001; tx += 1001; ty += 1001;
    s = make_pair(sx,sy);
    t = make_pair(tx,ty);
    visited[sy][sx] = true;
    visited[ty][tx] = true;

    auto bfs = [&](pair<int,int> from,pair<int,int> to)-> string {
        queue<pair<int,int>> qp;
        vector<vector<string>> cost_map(MAX_SIZE,vector<string>(MAX_SIZE,"."));
        auto [stx,sty] = from;
        auto [gx,gy] = to;
        cost_map[sty][stx] = "";
        qp.push(from);
        while(!qp.empty()) {
            auto [x,y] = qp.front(); qp.pop();
            if (x == gx && y == gy) break;
            REP(i,4) {
                string ds(1,dir[i]);
                if ( y+dy[i] >= MAX_SIZE || y+dy[i] < 0 || x+dx[i] >= MAX_SIZE || x+dx[i] < 0) continue;
                else if (!(y+dy[i] == gy && x+dx[i] == gx) && visited[y+dy[i]][x+dx[i]]) continue;
                else if (cost_map[y+dy[i]][x+dx[i]] != "." && cost_map[y+dy[i]][x+dx[i]].size() <= (cost_map[y][x].size() + 1)) continue;
                else {
                    cost_map[y+dy[i]][x+dx[i]] = cost_map[y][x] + ds;
                    qp.emplace(x+dx[i],y+dy[i]);
                }
            }
        }
        assert(cost_map[gy][gx] != ".");
        return cost_map[gy][gx];
    };
    auto update_visited_map = [&](pair<int,int> from, const string& route) {
        auto get_update_pair = [&](char c)-> pair<int,int> {
            REP(i,4) {
                if (c == dir[i]) return make_pair(dx[i],dy[i]);
            }
            return make_pair(-INF,-INF);
        };
        auto [x,y] = from;
        for(const auto &c: route) {
            auto [dx,dy] = get_update_pair(c);
            x += dx; y += dy;
            visited[y][x] = true;
        }
    };

    string save;
    auto route = bfs(s,t);
    save += route;
    update_visited_map(s,route);
    route = bfs(t,s);
    save += route;
    update_visited_map(t,route);
    route = bfs(s,t);
    save += route;
    update_visited_map(s,route);
    route = bfs(t,s);
    save += route;
    update_visited_map(t,route);
    cout << save << endl;
}

int main() {
    solve();
    return 0;
}


#include <bits/stdc++.h>
#define INF 1e9
#define INFLL 1ull<<60u
using namespace std;

#define REPR(i,n) for(int i=(n); i >= 0; --i)
#define FOR(i, m, n) for(int i = (m); i < (n); ++i)
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define ALL(a)  (a).begin(),(a).end()
#define endl "\n"

template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
typedef long long ll;

const int MAX_SIZE = 3010;

void solve() {
    vector<vector<bool>> visited(MAX_SIZE,vector<bool>(MAX_SIZE,false));
    int dx[4] = {0,0,1,-1};
    int dy[4] = {1,-1,0,0};
    char dir[4] = {'U','D','R','L'};
    pair<int,int> s,t;
    int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty;
    sx += 1500; sy += 1500; tx += 1500; ty += 1500;
    s = make_pair(sx,sy);
    t = make_pair(tx,ty);
    visited[sy][sx] = true;
    visited[ty][tx] = true;

    auto bfs = [&](pair<int,int> from,pair<int,int> to)-> string {
        queue<pair<int,int>> qp;
        vector<vector<string>> cost_map(MAX_SIZE,vector<string>(MAX_SIZE,"."));
        auto [stx,sty] = from;
        auto [gx,gy] = to;
        cost_map[sty][stx] = "";
        qp.push(from);
        while(!qp.empty()) {
            auto [x,y] = qp.front(); qp.pop();
            if (x == gx && y == gy) break;
            REP(i,4) {
                string ds(1,dir[i]);
                if ( y+dy[i] >= 3010 || y+dy[i] < 0 || x+dx[i] >= 3010 || x+dx[i] < 0) continue;
                else if (!(y+dy[i] == gy && x+dx[i] == gx) && visited[y+dy[i]][x+dx[i]]) continue;
                else if (cost_map[y+dy[i]][x+dx[i]] != "." && cost_map[y+dy[i]][x+dx[i]].size() <= (cost_map[y][x].size() + 1)) continue;
                else {
                    cost_map[y+dy[i]][x+dx[i]] = cost_map[y][x] + ds;
                    qp.emplace(x+dx[i],y+dy[i]);
                }
            }
        }
        assert(cost_map[gy][gx] != ".");
        return cost_map[gy][gx];
    };
    auto update_visited_map = [&](pair<int,int> from, const string& route) {
        auto get_update_pair = [&](char c)-> pair<int,int> {
            REP(i,4) {
                if (c == dir[i]) return make_pair(dx[i],dy[i]);
            }
            return make_pair(-INF,-INF);
        };
        auto [x,y] = from;
        for(const auto &c: route) {
            auto [dx,dy] = get_update_pair(c);
            x += dx; y += dy;
            visited[y][x] = true;
        }
    };

    string save;
    auto route = bfs(s,t);
    save += route;
    update_visited_map(s,route);
    route = bfs(t,s);
    save += route;
    update_visited_map(t,route);
    route = bfs(s,t);
    save += route;
    update_visited_map(s,route);
    route = bfs(t,s);
    save += route;
    update_visited_map(t,route);
    cout << save << endl;
}

int main() {
    solve();
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main(void){
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;

const int dx=tx-sx,dy=ty-sy;

 // Path 1
cout << string(dy,’U’) << string(dx,’R’);

// Path 2
cout << string(dy,’D’) << string(dx,’L’);

// Path 3
cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;

// Path 4
cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;

// EndLine
cout << endl;
return 0;
}


#include <stdio.h>

int main(){
  int sx,sy,tx,ty;
  int i,tmp;

  scanf("%d %d %d %d",&sx,&sy,&tx,&ty);

  //s-->t
  tmp=tx-sx;
  for(i=0;i<tmp;i++){
    printf("R");
  }
  tmp=ty-sy;
  for(i=0;i<tmp;i++){
    printf("U");
  }

  //t-->s
  tmp=tx-sx;
  for(i=0;i<tmp;i++){
    printf("L");
  }
  tmp=ty-sy;
  for(i=0;i<tmp;i++){
    printf("D");
  }

  //s-->t
  tmp=tx-sx+1;
  printf("D");
  for(i=0;i<tmp;i++){
    printf("R");
  }
  tmp=ty-sy+1;
  for(i=0;i<tmp;i++){
    printf("U");
  }
  printf("L");

  //t-->s
  tmp=tx-sx+1;
  printf("U");
  for(i=0;i<tmp;i++){
    printf("L");
  }
  tmp=ty-sy+1;
  for(i=0;i<tmp;i++){
    printf("D");
  }
  printf("R");

}


#include <stdio.h>

int main(void){
	int sx, sy, tx, ty;

	scanf("%d%d%d%d", &sx, &sy, &tx, &ty);
	tx -= sx;
	ty -= sy;
	for(int i=0; i < 4; i++) {
        if(i==2){
            tx++;   ty++;
        }
		if(i >= 2)
			printf((i%2) ? "U" : "D");
		for(int j=0; j < tx; j++) {
			printf((i%2) ? "L" : "R");
		}
		for(int j=0; j < ty; j++) {
			printf((i%2) ? "D" : "U");
		}
		if(i >= 2)
			printf((i%2) ? "R" : "L");
	}

	return 0;
}


#include <stdio.h>

int main(void){
	int sx, sy, tx, ty;

	scanf("%d%d%d%d", &sx, &sy, &tx, &ty);
	tx -= sx;
	ty -= sy;
	for(int i=0; i < 4; i++) {
		if(i == 2) {
			tx++;   ty++;
		}
		if(i >= 2)
			printf((i % 2) ? "U" : "D");
		for(int j=0; j < tx; j++) {
			printf((i % 2) ? "L" : "R");
		}
		for(int j=0; j < ty; j++) {
			printf((i % 2) ? "D" : "U");
		}
		if(i >= 2)
			printf((i % 2) ? "R" : "L");
	}

	return 0;
}


#include <stdio.h>

int main(void){
    int x0, y0, x1, y1;
    int xl, yl;
    scanf("%d %d %d %d", &x0, &y0, &x1, &y1);

    xl = x1 - x0;
    yl = y1 - y0;

    for(int i = 0; i < xl; i++) printf("%c", 'U');
    for(int i = 0; i < yl; i++) printf("%c", 'R');
    for(int i = 0; i < yl; i++) printf("%c", 'D');
    for(int i = 0; i < xl; i++) printf("%c", 'L');

    printf("%c", 'L');
    for(int i = 0; i < xl + 1; i++) printf("%c", 'U');
    for(int i = 0; i < yl + 1; i++) printf("%c", 'R');
    printf("%c", 'D');

    printf("%c", 'R');
    for(int i = 0; i < yl + 1; i++) printf("%c", 'D');
    for(int i = 0; i < xl + 1; i++) printf("%c", 'L');
    printf("%c\n", 'U');

    return 0;
}


#include<stdio.h>
#include<stdlib.h>

int max(int a, int b){
  if(a > b) return a;
  else return b;
}

int min(int a, int b){
  if(a < b) return a;
  else return b;
}

int main(){

  int sx,sy,tx,ty;
  scanf("%d %d %d %d",sx,sy,tx,ty);

  for(int i = 0; i < abs(tx-sx); ++i){
    printf("R");
  }

  for(int i = 0; i < abs(ty-sy); ++i){
    printf("U");
  }

  for(int i = 0; i < abs(tx-sx); ++i){
    printf("L");
  }

  for(int i = 0; i < abs(ty-sy); ++i){
    printf("D");
  }

  printf("D");

  for(int i = 0; i < abs(tx-sx)+1; ++i){
    printf("R");
  }

  for(int i = 0; i < abs(ty-sy)+1; ++i){
    printf("U");
  }

  printf("LU");

  for(int i = 0; i < abs(tx-sx)+1; ++i){
    printf("L");
  }

  for(int i = 0; i < abs(ty-sy)+1; ++i){
    printf("D");
  }

  printf("R\n");

  return 0;

}


#include<stdio.h>
#include<stdlib.h>

#define string(num,c) \
    for(i = 0;i < num;i++){ \
        printf("%s",c); \
    } \

int main(void){

    int sx,sy,tx,ty,i,dx,dy;

    scanf("%d %d %d %d",&sx,&sy,&tx,&ty);

    dx = tx - sx;
    dy = ty - sy;

    string(dy,"U");
    string(dx,"R");
    string(dy,"D");
    string(dx,"L");
    printf("L");
    string(dy+1,"U");
    string(dx+1,"R");
    printf("D");
    printf("R");
    string(dy+1,"U");
    string(dx+1,"L");
    printf("U\n");

    return 0;
}


inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
l = inp.shift().split(' ')
sx = l.shift() * 1
sy = l.shift() * 1
tx = l.shift() * 1
ty = l.shift() * 1
ans = ''
for (i=sx; i<tx; i++) {
    ans += 'R'
}
for (i=sy; i<ty; i++) {
    ans += 'U'
}
for (i=tx; i>sx; i--) {
    ans += 'L'
}
for (i=ty; i>sy; i--) {
    ans += 'D'
}
ans += 'D'
for (i=sx; i<=tx; i++) {
    ans += 'R'
}
for (i=sy; i<=ty; i++) {
    ans += 'U'
}
ans += 'L'
ans += 'U'
for (i=tx; i>=sx; i--) {
    ans += 'L'
}
for (i=ty; i>=sy; i--) {
    ans += 'D'
}
ans += 'R'
console.log(ans)


module.exports=function(r){var e={};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=r,t.c=e,t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,e){if(1&e&&(r=t(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var o in r)t.d(n,o,function(e){return r[e]}.bind(null,o));return n},t.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},t.p="",t(t.s=0)}([function(r,e,t){t(1)(t(2).readFileSync("/dev/stdin","UTF-8").split("\n"))},function(r,e){function t(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=[],n=!0,o=!1,u=void 0;try{for(var i,f=r[Symbol.iterator]();!(n=(i=f.next()).done)&&(t.push(i.value),!e||t.length!==e);n=!0);}catch(r){o=!0,u=r}finally{try{n||null==f.return||f.return()}finally{if(o)throw u}}return t}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.exports=function(r){var e=t(r[0].split(" ").map(function(r){return Number(r)}),4),n=e[0],o=e[1],u=e[2]-n,i=e[3]-o,f=l("R",u)+l("U",i)+l("L",u)+l("D",i)+"L"+l("U",i+1)+l("R",u+1)+"DR"+l("D",i+1)+l("L",u+1)+"U";function l(r,e){for(var t="",n=0;n<e;n++)t+=r;return t}console.log(f)}},function(r,e){r.exports=require("fs")}]);


'use strict';

function Main(INPUT) {
    const input = INPUT.split("\n")[0].split(" ");
    const sx = input[0];
    const sy = input[1];
    const tx = input[2];
    const ty = input[3];
    let ans = "";

    for (let i = 0; i < ty - sy; i++) {
        ans += "U";
    }
    for (let i = 0; i < tx - sx; i++) {
        ans += "R";
    }
    for (let i = 0; i < ty - sy; i++) {
        ans += "D";
    }
    for (let i = 0; i <= tx - sx; i++) {
        ans += "L";
    }

    for (let i = 0; i <= ty - sy; i++) {
        ans += "U";
    }
    for (let i = 0; i <= tx - sx; i++) {
        ans += "R";
    }
    ans += "DR"
    for (let i = 0; i <= ty - sy; i++) {
        ans += "D";
    }
    for (let i = 0; i <= tx - sx; i++) {
        ans += "L";
    }
    ans += "U";

    console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main (input) {
  input = input.split("\n")[0].split(" ").map(Number);
  var t = {
    x:input[2],
    y:input[3]
  };
  var ans = "";
  for (var i = 0; i < t.y; i++) {
    ans += "U";
  }
  for (var i = 0; i < t.x; i++) {
    ans += "R";
  }
  for (var i = 0; i < t.y; i++) {
    ans += "D";
  }
  for (var i = 0; i < t.x; i++) {
    ans += "L";
  }
  ans += "L";
  for (var i = 0; i < t.y+1; i++) {
    ans += "U";
  }
  for (var i = 0; i < t.x+1; i++) {
    ans += "R";
  }
  ans += "DR";
  for (var i = 0; i < t.y+1; i++) {
    ans += "D";
  }
  for (var i = 0; i < t.x+1; i++) {
    ans += "L";
  }
  ans += "U";
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


"use strict";

const main = arg => {
    arg = arg.trim().split("\n");
    const SX = parseInt(arg[0].split(" ")[0]);
    const SY = parseInt(arg[0].split(" ")[1]);
    const TX = parseInt(arg[0].split(" ")[2]);
    const TY = parseInt(arg[0].split(" ")[3]);

    const DX = TX - SX;
    const DY = TY - SY;

    let answer = [];

    for(let i=0; i<DX; i++) {
        answer.push("R");
    }

    for(let i=0; i<DY; i++) {
        answer.push("U");
    }

    for(let i=0; i<DX; i++) {
        answer.push("L");
    }

    for(let i=0; i<DY; i++) {
        answer.push("D");
    }

    answer.push("L");

    for(let i=0; i<DY+1; i++) {
        answer.push("U");
    }

    for(let i=0; i<DX+1; i++) {
        answer.push("R");
    }

    answer.push("D");

    for(let i=0; i<DY+1; i++) {
        answer.push("D");
    }

    for(let i=0; i<DX+1; i++) {
        answer.push("L");
    }

    answer.push("U");

    console.log(answer.join(""));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


"use strict";

const main = arg => {
    arg = arg.trim().split("\n");
    const SX = parseInt(arg[0].split(" ")[0]);
    const SY = parseInt(arg[0].split(" ")[1]);
    const TX = parseInt(arg[0].split(" ")[2]);
    const TY = parseInt(arg[0].split(" ")[3]);

    let answer = [];

    for(let i=0; i<TX; i++) {
        answer.push("R");
    }

    for(let i=0; i<TY; i++) {
        answer.push("U");
    }

    for(let i=0; i<TX; i++) {
        answer.push("L");
    }

    for(let i=0; i<TY; i++) {
        answer.push("D");
    }

    answer.push("L");

    for(let i=0; i<TY+1; i++) {
        answer.push("U");
    }

    for(let i=0; i<TX+1; i++) {
        answer.push("R");
    }

    answer.push("D");

    for(let i=0; i<TY+1; i++) {
        answer.push("D");
    }

    for(let i=0; i<TX+1; i++) {
        answer.push("L");
    }

    answer.push("U");

    console.log(answer.join(""));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


// はい
package main

import (
	"fmt"
	"strings"
)

func main() {
	var Sx, Sy, Tx, Ty int
	fmt.Scan(&Sx, &Sy, &Tx, &Ty)
	ans := ""
	ans += strings.Repeat("R", Tx-Sx) + strings.Repeat("U", Ty-Sy)
	ans += strings.Repeat("L", Tx-Sx) + strings.Repeat("D", Ty-Sy) + "D"
	ans += strings.Repeat("R", Tx-Sx+1) + strings.Repeat("U", Ty-Sy+1) + "LU"
	ans += strings.Repeat("L", Tx-Sx+1) + strings.Repeat("D", Ty-Sy+1) + "R"
	fmt.Println(ans)
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var sx, sy, tx, ty int
	fmt.Scan(&sx, &sy, &tx, &ty)

	dx, dy := tx-sx, ty-sy

	// s -> t
	fmt.Print(strings.Repeat("U", dy))
	fmt.Print(strings.Repeat("R", dx))

	// t -> s
	fmt.Print(strings.Repeat("D", dy))
	fmt.Print(strings.Repeat("L", dx))

	// s -> t
	fmt.Print("L")
	fmt.Print(strings.Repeat("U", dy+1))
	fmt.Print(strings.Repeat("R", dx+1))
	fmt.Print("D")

	// t -> s
	fmt.Print("R")
	fmt.Print(strings.Repeat("D", dy+1))
	fmt.Print(strings.Repeat("L", dx+1))
	fmt.Print("U")

	fmt.Println()
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var sx, sy, tx, ty int
	fmt.Scan(&sx, &sy, &tx, &ty)
	x := tx - sx
	y := ty - sy
	s := ""
	s = s + strings.Repeat("R", x)
	s = s + strings.Repeat("U", y)
	s = s + strings.Repeat("L", x)
	s = s + strings.Repeat("D", y)
	s = s + "D"
	s = s + strings.Repeat("R", x+1)
	s = s + strings.Repeat("U", y+1)
	s = s + "LU"
	s = s + strings.Repeat("L", x+1)
	s = s + strings.Repeat("D", y+1)
	s = s + "R"
	fmt.Println(s)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var (
	finv, inv, fac [MAX]int
)

func COM(n, k int) int {
	MOD := int(MOD)
	if n < k {
		return 0
	}
	if n < 0 || k < 0 {
		return 0
	}
	return fac[n] * (finv[k] * finv[n-k] % MOD) % MOD
}

func init() {
	MOD := int(MOD)
	fac[0] = 1
	fac[1] = 1
	finv[0] = 1
	finv[1] = 1
	inv[1] = 1
	for i := 2; i < MAX; i++ {
		fac[i] = fac[i-1] * i % MOD
		inv[i] = MOD - inv[MOD%i]*(MOD/i)%MOD
		finv[i] = finv[i-1] * inv[i] % MOD
	}
	//sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	sc.Buffer([]byte{}, 500100)
}

const (
	MAX = 510000
)

var MOD int64 = 1000000007

func ModAdd(a, b int64) int64 {
	return (a + b) % MOD
}

func ModMul(a, b int64) int64 {
	ans := a * b % MOD
	if ans < 0 {
		ans += MOD
	}
	return ans
}

func ModSub(a, b int64) int64 {
	r := (a%MOD - b%MOD) % MOD
	if r < 0 {
		r += MOD
	}
	return r
}

func ModDiv(a, b int64) int64 {
	return a % MOD * ModInv(b) % MOD
}

func ModPow(a, n int64) int64 {
	var r int64 = 1
	for n > 0 {
		if n&1 == 1 {
			r = r * a % MOD
		}
		a = a * a % MOD
		n >>= 1
	}
	return r
}

func ModInv(a int64) int64 {
	var b, u, v int64 = MOD, 1, 0
	for b > 0 {
		t := a / b
		a -= t * b
		a, b = b, a
		u -= t * v
		u, v = v, u
	}
	u %= MOD
	if u < 0 {
		u += MOD
	}
	return u
}

type Q struct {
	value int
	index int
	K     int
}

type QS []*Q

func (p QS) Len() int           { return len(p) }
func (p QS) Less(i, j int) bool { return p[i].value > p[j].value }
func (pq QS) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *QS) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Q)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *QS) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // avoid memory leak
	item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func GCD(a, b int64) int64 {
	if b == 0 {
		return a
	}
	return GCD(b, a%b)
}

func LCM(a, b int64) int64 {
	return a * b / GCD(a, b)
}

type UnionFind struct {
	par  []int
	size []int
}

func NewUnionFind(size int) *UnionFind {
	return new(UnionFind).init(size)
}

func (uf *UnionFind) init(size int) *UnionFind {
	uf.par = make([]int, size)
	uf.size = make([]int, size)

	for i := 0; i < size; i++ {
		uf.par[i] = i
		uf.size[i] = 1
	}
	return uf
}

func (uf *UnionFind) Unite(p int, q int) {
	rp := uf.Root(p)
	rq := uf.Root(q)
	if rp == rq {
		return
	}
	if uf.size[rp] < uf.size[rq] {
		uf.par[rp] = uf.par[rq]
		uf.size[rq] += uf.size[rp]
	} else {
		uf.par[rq] = uf.par[rp]
		uf.size[rp] += uf.size[rq]
	}
}

func (uf *UnionFind) Root(p int) int {
	for uf.par[p] == p {
		return p
	}
	uf.par[p] = uf.Root(uf.par[p])
	return uf.par[p]
}

func (uf *UnionFind) Size(p int) int {
	return uf.size[uf.Root(p)]
}

func (uf *UnionFind) Same(p int, q int) bool {
	return uf.Root(p) == uf.Root(q)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	n, _ := strconv.Atoi(getStr())
	return n
}

func getStr() string {
	sc.Scan()
	return sc.Text()
}

func factor(result map[int]int, num, pnum int) map[int]int {
	if pnum*pnum > num {
		if num != 1 {
			result[num] += 1
		}
		return result
	}

	if num%pnum == 0 {
		num /= pnum
		result[pnum]++
	} else {
		pnum++
	}
	return factor(result, num, pnum)
}

type P struct {
	x, y    int
	command []byte
}

func main() {
	SX, SY, GX, GY := getInt(), getInt(), getInt(), getInt()

	rev := map[string]string{
		"D": "U",
		"U": "D",
		"L": "R",
		"R": "L",
	}
	queue := []*P{{SX, SY, []byte{}}}
	x, y, c := []int{0, 0, 1, -1}, []int{1, -1, 0, 0}, []string{"U", "D", "R", "L"}
	var p *P
	filled := map[string]bool{}
	for len(queue) > 0 {
		q := queue[0]
		queue = queue[1:]
		//		fmt.Println(q, string(q.command))

		if q.x == GX && q.y == GY {
			p = q
			break
		}
		for i := 0; i < 4; i++ {
			x := q.x + x[i]
			y := q.y + y[i]
			if !filled[fmt.Sprintf("%d/%d", x, y)] {
				filled[fmt.Sprintf("%d/%d", x, y)] = true
				queue = append(queue, &P{x, y, append(append([]byte{}, q.command...), []byte(c[i])...)})
			}
		}
	}
	command := string(p.command)
	fmt.Print(command)
	for _, r := range []rune(command) {
		fmt.Print(rev[string(r)])
	}
	command = "LU" + command + "RD"
	fmt.Print(command)
	for _, r := range []rune(command) {
		fmt.Print(rev[string(r)])
	}
	fmt.Println()
}

type IntHeap []int

func (h IntHeap) Len() int           { return len(h) }
func (h IntHeap) Less(i, j int) bool { return h[i] > h[j] }
func (h IntHeap) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }

func (h *IntHeap) Push(x interface{}) {
	// Push and Pop use pointer receivers because they modify the slice's length,
	// not just its contents.
	*h = append(*h, x.(int))
}

func (h *IntHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func Reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var (
	finv, inv, fac [MAX]int
)

func COM(n, k int) int {
	MOD := int(MOD)
	if n < k {
		return 0
	}
	if n < 0 || k < 0 {
		return 0
	}
	return fac[n] * (finv[k] * finv[n-k] % MOD) % MOD
}

func init() {
	MOD := int(MOD)
	fac[0] = 1
	fac[1] = 1
	finv[0] = 1
	finv[1] = 1
	inv[1] = 1
	for i := 2; i < MAX; i++ {
		fac[i] = fac[i-1] * i % MOD
		inv[i] = MOD - inv[MOD%i]*(MOD/i)%MOD
		finv[i] = finv[i-1] * inv[i] % MOD
	}
	//sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	sc.Buffer([]byte{}, 500100)
}

const (
	MAX = 510000
)

var MOD int64 = 1000000007

func ModAdd(a, b int64) int64 {
	return (a + b) % MOD
}

func ModMul(a, b int64) int64 {
	ans := a * b % MOD
	if ans < 0 {
		ans += MOD
	}
	return ans
}

func ModSub(a, b int64) int64 {
	r := (a%MOD - b%MOD) % MOD
	if r < 0 {
		r += MOD
	}
	return r
}

func ModDiv(a, b int64) int64 {
	return a % MOD * ModInv(b) % MOD
}

func ModPow(a, n int64) int64 {
	var r int64 = 1
	for n > 0 {
		if n&1 == 1 {
			r = r * a % MOD
		}
		a = a * a % MOD
		n >>= 1
	}
	return r
}

func ModInv(a int64) int64 {
	var b, u, v int64 = MOD, 1, 0
	for b > 0 {
		t := a / b
		a -= t * b
		a, b = b, a
		u -= t * v
		u, v = v, u
	}
	u %= MOD
	if u < 0 {
		u += MOD
	}
	return u
}

type Q struct {
	value int
	index int
	K     int
}

type QS []*Q

func (p QS) Len() int           { return len(p) }
func (p QS) Less(i, j int) bool { return p[i].value > p[j].value }
func (pq QS) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *QS) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Q)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *QS) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // avoid memory leak
	item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func GCD(a, b int64) int64 {
	if b == 0 {
		return a
	}
	return GCD(b, a%b)
}

func LCM(a, b int64) int64 {
	return a * b / GCD(a, b)
}

type UnionFind struct {
	par  []int
	size []int
}

func NewUnionFind(size int) *UnionFind {
	return new(UnionFind).init(size)
}

func (uf *UnionFind) init(size int) *UnionFind {
	uf.par = make([]int, size)
	uf.size = make([]int, size)

	for i := 0; i < size; i++ {
		uf.par[i] = i
		uf.size[i] = 1
	}
	return uf
}

func (uf *UnionFind) Unite(p int, q int) {
	rp := uf.Root(p)
	rq := uf.Root(q)
	if rp == rq {
		return
	}
	if uf.size[rp] < uf.size[rq] {
		uf.par[rp] = uf.par[rq]
		uf.size[rq] += uf.size[rp]
	} else {
		uf.par[rq] = uf.par[rp]
		uf.size[rp] += uf.size[rq]
	}
}

func (uf *UnionFind) Root(p int) int {
	for uf.par[p] == p {
		return p
	}
	uf.par[p] = uf.Root(uf.par[p])
	return uf.par[p]
}

func (uf *UnionFind) Size(p int) int {
	return uf.size[uf.Root(p)]
}

func (uf *UnionFind) Same(p int, q int) bool {
	return uf.Root(p) == uf.Root(q)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	n, _ := strconv.Atoi(getStr())
	return n
}

func getStr() string {
	sc.Scan()
	return sc.Text()
}

func factor(result map[int]int, num, pnum int) map[int]int {
	if pnum*pnum > num {
		if num != 1 {
			result[num] += 1
		}
		return result
	}

	if num%pnum == 0 {
		num /= pnum
		result[pnum]++
	} else {
		pnum++
	}
	return factor(result, num, pnum)
}

type P struct {
	x, y    int
	command []byte
}

func main() {
	SX, SY, GX, GY := getInt(), getInt(), getInt(), getInt()

	rev := map[string]string{
		"D": "U",
		"U": "D",
		"L": "R",
		"R": "L",
	}
	queue := []*P{{SX, SY, []byte{}}}
	x, y, c := []int{0, 0, 1, -1}, []int{1, -1, 0, 0}, []string{"U", "D", "R", "L"}
	var p *P
	filled := [5000][5000]bool{}
	for len(queue) > 0 {
		q := queue[0]
		queue = queue[1:]
		//		fmt.Println(q, string(q.command))

		if q.x == GX && q.y == GY {
			p = q
			break
		}
		for i := 0; i < 4; i++ {
			x := q.x + x[i]
			y := q.y + y[i]
			if !filled[x+1000][y+1000] {
				filled[x+1000][y+1000] = true
				queue = append(queue, &P{x, y, append(append([]byte{}, q.command...), []byte(c[i])...)})
			}
		}
	}
	command := string(p.command)
	fmt.Print(command)
	for _, r := range []rune(command) {
		fmt.Print(rev[string(r)])
	}
	command = "LU" + command + "RD"
	fmt.Print(command)
	for _, r := range []rune(command) {
		fmt.Print(rev[string(r)])
	}
	fmt.Println()
}

type IntHeap []int

func (h IntHeap) Len() int           { return len(h) }
func (h IntHeap) Less(i, j int) bool { return h[i] > h[j] }
func (h IntHeap) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }

func (h *IntHeap) Push(x interface{}) {
	// Push and Pop use pointer receivers because they modify the slice's length,
	// not just its contents.
	*h = append(*h, x.(int))
}

func (h *IntHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func Reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var (
	finv, inv, fac [MAX]int
)

func COM(n, k int) int {
	MOD := int(MOD)
	if n < k {
		return 0
	}
	if n < 0 || k < 0 {
		return 0
	}
	return fac[n] * (finv[k] * finv[n-k] % MOD) % MOD
}

func init() {
	MOD := int(MOD)
	fac[0] = 1
	fac[1] = 1
	finv[0] = 1
	finv[1] = 1
	inv[1] = 1
	for i := 2; i < MAX; i++ {
		fac[i] = fac[i-1] * i % MOD
		inv[i] = MOD - inv[MOD%i]*(MOD/i)%MOD
		finv[i] = finv[i-1] * inv[i] % MOD
	}
	//sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	sc.Buffer([]byte{}, 500100)
}

const (
	MAX = 510000
)

var MOD int64 = 1000000007

func ModAdd(a, b int64) int64 {
	return (a + b) % MOD
}

func ModMul(a, b int64) int64 {
	ans := a * b % MOD
	if ans < 0 {
		ans += MOD
	}
	return ans
}

func ModSub(a, b int64) int64 {
	r := (a%MOD - b%MOD) % MOD
	if r < 0 {
		r += MOD
	}
	return r
}

func ModDiv(a, b int64) int64 {
	return a % MOD * ModInv(b) % MOD
}

func ModPow(a, n int64) int64 {
	var r int64 = 1
	for n > 0 {
		if n&1 == 1 {
			r = r * a % MOD
		}
		a = a * a % MOD
		n >>= 1
	}
	return r
}

func ModInv(a int64) int64 {
	var b, u, v int64 = MOD, 1, 0
	for b > 0 {
		t := a / b
		a -= t * b
		a, b = b, a
		u -= t * v
		u, v = v, u
	}
	u %= MOD
	if u < 0 {
		u += MOD
	}
	return u
}

type Q struct {
	value int
	index int
	K     int
}

type QS []*Q

func (p QS) Len() int           { return len(p) }
func (p QS) Less(i, j int) bool { return p[i].value > p[j].value }
func (pq QS) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *QS) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Q)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *QS) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // avoid memory leak
	item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func GCD(a, b int64) int64 {
	if b == 0 {
		return a
	}
	return GCD(b, a%b)
}

func LCM(a, b int64) int64 {
	return a * b / GCD(a, b)
}

type UnionFind struct {
	par  []int
	size []int
}

func NewUnionFind(size int) *UnionFind {
	return new(UnionFind).init(size)
}

func (uf *UnionFind) init(size int) *UnionFind {
	uf.par = make([]int, size)
	uf.size = make([]int, size)

	for i := 0; i < size; i++ {
		uf.par[i] = i
		uf.size[i] = 1
	}
	return uf
}

func (uf *UnionFind) Unite(p int, q int) {
	rp := uf.Root(p)
	rq := uf.Root(q)
	if rp == rq {
		return
	}
	if uf.size[rp] < uf.size[rq] {
		uf.par[rp] = uf.par[rq]
		uf.size[rq] += uf.size[rp]
	} else {
		uf.par[rq] = uf.par[rp]
		uf.size[rp] += uf.size[rq]
	}
}

func (uf *UnionFind) Root(p int) int {
	for uf.par[p] == p {
		return p
	}
	uf.par[p] = uf.Root(uf.par[p])
	return uf.par[p]
}

func (uf *UnionFind) Size(p int) int {
	return uf.size[uf.Root(p)]
}

func (uf *UnionFind) Same(p int, q int) bool {
	return uf.Root(p) == uf.Root(q)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	n, _ := strconv.Atoi(getStr())
	return n
}

func getStr() string {
	sc.Scan()
	return sc.Text()
}

func factor(result map[int]int, num, pnum int) map[int]int {
	if pnum*pnum > num {
		if num != 1 {
			result[num] += 1
		}
		return result
	}

	if num%pnum == 0 {
		num /= pnum
		result[pnum]++
	} else {
		pnum++
	}
	return factor(result, num, pnum)
}

type P struct {
	x, y    int
	command []byte
}

func main() {
	SX, SY, GX, GY := getInt(), getInt(), getInt(), getInt()

	rev := map[string]string{
		"D": "U",
		"U": "D",
		"L": "R",
		"R": "L",
	}
	queue := []*P{{SX, SY, []byte{}}}
	x, y, c := []int{0, 0, 1, -1}, []int{1, -1, 0, 0}, []string{"U", "D", "R", "L"}
	var p *P
	filled := [2010][2010]bool{}
	for len(queue) > 0 {
		q := queue[0]
		queue = queue[1:]
		//		fmt.Println(q, string(q.command))

		if q.x == GX && q.y == GY {
			p = q
			break
		}
		for i := 0; i < 4; i++ {
			x := q.x + x[i]
			y := q.y + y[i]
			if !filled[x+1000][y+1000] {
				filled[x+1000][y+1000] = true
				queue = append(queue, &P{x, y, append(append([]byte{}, q.command...), []byte(c[i])...)})
			}
		}
	}
	command := string(p.command)
	fmt.Print(command)
	for _, r := range []rune(command) {
		fmt.Print(rev[string(r)])
	}
	command = "LU" + command + "RD"
	fmt.Print(command)
	for _, r := range []rune(command) {
		fmt.Print(rev[string(r)])
	}
	fmt.Println()
}

type IntHeap []int

func (h IntHeap) Len() int           { return len(h) }
func (h IntHeap) Less(i, j int) bool { return h[i] > h[j] }
func (h IntHeap) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }

func (h *IntHeap) Push(x interface{}) {
	// Push and Pop use pointer receivers because they modify the slice's length,
	// not just its contents.
	*h = append(*h, x.(int))
}

func (h *IntHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func Reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}


sx, sy, tx, ty = gets.split.map(&:to_i)
ret = []

a = ty - sy
b = tx - sx

ret << 'U' * a
ret << 'R' * b
ret << 'D' * a
ret << 'L' * b
ret << 'L'
ret << 'U' * (a + 1)
ret << 'R' * (b + 1)
ret << 'D'
ret << 'R'
ret << 'D' * (a + 1)
ret << 'L' * (b + 1)
ret << 'U'

puts ret.join


sx,sy,tx,ty=$<.read.split.map(&:to_i)
h = {
    'U' => 'D',
    'D' => 'U',
    'R' => 'L',
    'L' => 'R',
}

s = ''

s += 'R' * (tx-sx)
s += 'U' * (ty-sy)
s += 'L' * (tx-sx)
s += 'D' * (ty-sy)

s += 'D'
s += 'R' * (tx-sx+1)
s += 'U' * (ty-sy+1)
s += 'L'
s += 'U'
s += 'L' * (tx-sx+1)
s += 'D' * (ty-sy+1)
s += 'R'

puts s


sx, sy, tx, ty = gets.split.map(&:to_i)
x, y = (tx - sx), (ty - sy)
a  = "U" * y + "R" * x
a += "D" * y + "L" * x
a += "L" + "U" * (y + 1) + "R" * (x + 1) + "D"
a += "R" + "D" * (y + 1) + "L" * (x + 1) + "U"
puts a


s_x,s_y,t_x,t_y = gets.chomp.split(' ').map(&:to_i)
arr = []
arr << "U" * (t_y - s_y)
arr << "R" * (t_x - s_x)
arr << "D" * (t_y - s_y)
arr << "L" * (t_x - s_x + 1)
arr << "U" * (t_y - s_y + 1)
arr << "R" * (t_x - s_x + 1)
arr << "D"
arr << "R"
arr << "D" * (t_y - s_y + 1)
arr << "L" * (t_y - s_y + 1)
arr << "U"
puts arr.join


s_x,s_y,t_x,t_y = gets.chomp.split(' ').map(&:to_i)
arr = []
arr << "U" * (t_y - s_y)
arr << "R" * (t_x - s_x + 1)
arr << "D" * (t_y - s_y + 1)
arr << "U"
arr << "L"
arr << "U" * (t_y - s_y + 1)
arr << "R" * (t_x - s_x + 1)
arr << "D" * (t_y - s_y + 1)
arr << "L" * (t_x - s_x )
puts arr.join


sx, sy, tx, ty = gets.split(' ').map(&:to_i)
ans = []

dx = tx - sx
dy = ty - sy
# path1
# [rrr,uuuuuuuu]
ans << 'R'*dx << 'U'*dy
ans << 'D'*dx << 'L'*dy

# path2
ans << 'D' << 'R'*(dx+1) << 'U'*(dy+1) << 'L'
ans << 'U' << 'D'*(dx+1) << 'L'*(dy+1) << 'R'

puts ans.join


#![allow(unused_imports)]

use std::cmp;
use std::cmp::{max, min, Ordering};
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
use std::io::stdin;
use std::ops::*;
use std::process::exit;
use std::str::FromStr;

pub const MOD: usize = 1000000007;

fn main() {
    let (sx, sy, tx, ty): (i32, i32, i32, i32) = input_four();
    let dx = tx - sx;
    let dy = ty - sy;

    let mut ans = String::new();
    add(&mut ans, &'R', dx);
    add(&mut ans, &'U', dy);
    add(&mut ans, &'L', dx);
    add(&mut ans, &'D', dy+1);
    add(&mut ans, &'R', dx+1);
    add(&mut ans, &'U', dy+1);
    add(&mut ans, &'L', 1);
    add(&mut ans, &'U', 1);
    add(&mut ans, &'L', dx+1);
    add(&mut ans, &'D', dy+1);
    add(&mut ans, &'R', 1);

    println!("{}", ans);
    // dbg!(ans.len());
}

fn add(s: &mut String, c: &char, n: i32) {
    for i in 0..n {
        s.push(*c);
    }
}

pub fn input<T: FromStr>() -> T {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim().parse().ok().unwrap()
}

pub fn input_vec<T: FromStr>() -> Vec<T> {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim()
        .split_whitespace()
        .map(|x| x.parse().ok().unwrap())
        .collect::<Vec<_>>()
}

pub fn input_lines<T: FromStr>(l: usize) -> Vec<T> {
    let mut res = Vec::new();
    for _i in 0..l {
        res.push(input());
    }
    res
}

pub fn input_lines_two<T: FromStr, U: FromStr>(l: usize) -> Vec<(T, U)> {
    let mut res = Vec::new();
    for _i in 0..l {
        res.push(input_two());
    }
    res
}

pub fn input_lines_three<T: FromStr, U: FromStr, V: FromStr>(l: usize) -> Vec<(T, U, V)> {
    let mut res = Vec::new();
    for _i in 0..l {
        res.push(input_three());
    }
    res
}

pub fn input_two<T: FromStr, U: FromStr>() -> (T, U) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse::<T>().ok().unwrap(),
        s[1].parse::<U>().ok().unwrap(),
    )
}

pub fn input_three<T: FromStr, U: FromStr, V: FromStr>() -> (T, U, V) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse::<T>().ok().unwrap(),
        s[1].parse::<U>().ok().unwrap(),
        s[2].parse::<V>().ok().unwrap(),
    )
}

pub fn input_four<T: FromStr, U: FromStr, V: FromStr, W: FromStr>() -> (T, U, V, W) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse().ok().unwrap(),
        s[1].parse().ok().unwrap(),
        s[2].parse().ok().unwrap(),
        s[3].parse().ok().unwrap(),
    )
}


use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

pub fn read_n<T: FromStr>(n: usize) -> Vec<T> {
    read_n_logic::<T>(n, vec![])
}

pub fn read_n_logic<T: FromStr>(n: usize, mut a: Vec<T>) -> Vec<T> {
    match n {
        0 => a,
        _ => {
            a.push(read::<T>());
            read_n_logic(n - 1, a)
        }
    }
}
use std::cmp::{max, min};
use std::collections::HashSet;

fn main() {
    let sx: i64 = read();
    let sy: i64 = read();
    let tx: i64 = read();
    let ty: i64 = read();

    let mut ans: String = String::new();
    let xdist = tx - sx;
    let ydist = ty - sy;

    for _ in 0..xdist {
        ans += "R"
    }

    for _ in sy..ty {
        ans += "U"
    }

    for _ in sx..tx {
        ans += "L"
    }
    for _ in sy..ty {
        ans += "D"
    }
    ans += "D";

    for _ in sx..tx + 1 {
        ans += "R"
    }

    for _ in 0..ydist + 1 {
        ans += "U"
    }
    ans += "LU";
    for _ in 0..xdist + 1 {
        ans += "L"
    }

    for _ in 0..ydist + 1 {
        ans += "D"
    }
    ans += "R";
    println!("{}", ans);
}


use std::io::*;
use std::str::FromStr;

//https://qiita.com/tubo28/items/e6076e9040da57368845
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let sx: i32 = read();
    let sy: i32 = read();
    let tx: i32 = read();
    let ty: i32 = read();

    //右からsへ
    let mut ans:String = "".to_string();
    for _i in 0..(tx - sx) {
        ans += "R";
    }
    for _i in 0..(ty - sy) {
        ans += "U";
    }

    //左からtへ
    for _i in 0..(tx - sx) {
        ans += "L";
    }
    for _i in 0..(ty - sy) {
        ans += "D";
    }

    //左からsへ
    ans += "L";
    for _i in 0..(ty - sy + 1) {
        ans += "U";
    }
    for _i in 0..(tx - sx + 1) {
        ans += "R";
    }
    ans += "D";

    //右からtへ
    ans += "R";
    for _i in 0..(ty - sy + 1) {
        ans += "D";
    }
    for _i in 0..(tx - sx + 1) {
        ans += "L";
    }
    ans += "U";

    println!("{}", ans);

}


use proconio::input;

fn main() {
    input! {
        sx: i32,
        sy: i32,
        tx: i32,
        ty: i32,
    }

    // 行き
    (0..(ty - sy)).for_each(|_| print!("U"));
    (0..(tx - sx)).for_each(|_| print!("R"));
    // 帰り
    print!("U");
    (0..(tx - sx + 1)).for_each(|_| print!("L"));
    (0..(ty + 1 - sy)).for_each(|_| print!("D"));
    print!("R");

    // 行き
    print!("D");
    (0..(ty - sy + 1)).for_each(|_| print!("R"));
    (0..(tx + 1 - sx)).for_each(|_| print!("U"));
    print!("L");
    // 帰り
    (0..(tx - sx)).for_each(|_| print!("D"));
    (0..(ty - sy)).for_each(|_| print!("L"));

    println!("");
}


use proconio::input;

fn main() {
    input! {
        sx: i32,
        sy: i32,
        tx: i32,
        ty: i32,
    }

    let start = [(sx, sy + 1), (tx, ty + 1), (sx, sy - 1), (tx, ty - 1)];
    let goal  = [(tx - 1, ty), (sx - 1, sy), (tx + 1, ty), (sx + 1, sy)];

    for i in 0..4 {
        // 進行方向の+-を制御する、行きは+1, 帰りは-1
        let m = if i == 2 || i == 0 { 1 } else { -1 };

        match i {
            0..=1 => print!("U"),
            2..=3 => print!("D"),
            _ => unreachable!(),
        }

        let y = goal[i].1 - start[i].1;
        let x = goal[i].0 - start[i].0;

        for _ in 0..x.abs() {
            if m > 0 { print!("R"); } else { print!("L"); }
        }
        for _ in 0..y.abs() {
            if m > 0 { print!("U"); } else { print!("D"); }
        }

        match i {
            0..=1 => print!("R"),
            2..=3 => print!("L"),
            _ => unreachable!(),
        }
    }
    println!("");
}


let input = readLine()!.characters.split(" ").map{Int(String($0))!}
let (sx, sy, tx, ty) = (input[0], input[1], input[2], input[3])
let (dx, dy) = (tx-sx, ty-sy)
print("D", terminator: "")
(0...dx).forEach{_ in print("R", terminator: "")}
(0...dy).forEach{_ in print("U", terminator: "")}
(0...dx).forEach{_ in print("L", terminator: "")}
(0..<dy).forEach{_ in print("D", terminator: "")}
print("L", terminator: "")
(0...dy).forEach{_ in print("U", terminator: "")}
(0...dx).forEach{_ in print("R", terminator: "")}
(0...dy).forEach{_ in print("D", terminator: "")}
(0..<dx).forEach{_ in print("L", terminator: "")}


// Back and Forth

func main() {
    let values = readLine()!.split(separator: " ").map{Int($0)!}
    let sx = values[0]
    let sy = values[1]
    let tx = values[2]
    let ty = values[3]

    let dx = tx - sx
    let dy = ty - sy
    var s = ""

    // 最初のゴールまで
    s += String(repeating: "R", count: dx)
    s += String(repeating: "U", count: dy)

    // 戻ってくる
    s += String(repeating: "L", count: dx)
    s += String(repeating: "D", count: dy)

    // 別ルートでゴールへ
    s += "D"
    s += String(repeating: "R", count: dx+1)
    s += String(repeating: "U", count: dy+1)
    s += "L"

    // 別ルートで戻ってくる
    s += "U"
    s += String(repeating: "L", count: dx+1)
    s += String(repeating: "D", count: dy+1)
    s += "R"

    print(s)
}

main()


// Back and Forth

func main() {
    let values = readLine()!.split(separator: " ").map{Int($0)!}
    let sx = values[0]
    let sy = values[1]
    let tx = values[2]
    let ty = values[3]

    let dx = tx - sx
    let dy = ty - sy
    var s = ""

    // 最初のゴールまで
    s += String(repeating: "R", count: dx)
    s += String(repeating: "U", count: dy)

    // 戻ってくる
    s += String(repeating: "L", count: dx)
    s += String(repeating: "D", count: dx)

    // 別ルートでゴールへ
    s += "D"
    s += String(repeating: "R", count: dx+1)
    s += String(repeating: "U", count: dy+1)
    s += "L"

    // 別ルートで戻ってくる
    s += "U"
    s += String(repeating: "L", count: dx+1)
    s += String(repeating: "D", count: dy+1)
    s += "R"

    print(s)
}

main()


import Foundation

let a = readLine()!
let b = a.components(separatedBy: " ")

let sx = Int(b[0])!
let sy = Int(b[1])!
let tx = Int(b[2])!
let ty = Int(b[3])! //ok

for i in 0..<ty-sy{

    print("U", terminator:"")

}

for i in 0..<tx-sx{

    print("R", terminator:"")

}

for i in 0..<ty-sy{

    print("D", terminator:"")

}

for i in 0..<tx-sx+1{

    print("L", terminator:"")

}

for i in 0..<ty-sy+1{

    print("U", terminator:"")

}

for i in 0..<tx-sx+1{

    print("R", terminator:"")

}

print("D",terminator:"")
print("R",terminator:"")

for i in 0..<ty-sy+1{

    print("D", terminator:"")

}

for i in 0..<tx-sx+1{

    print("L", terminator:"")

}

print("U")


const stdin = require("fs").readFileSync("/dev/stdin", "utf8");
const [sx, sy, tx, ty] = stdin.split(" ").map(Number);
const diff = (x1, x2) => x2 - x1;
const dx = diff(sx, tx);
const dy = diff(sy, ty);
let result = "U".repeat(dy) + "R".repeat(dx);
result += "D".repeat(dy) + "L".repeat(dx);
result += "L".repeat(1) + "U".repeat(dy + 1) + "R".repeat(dx + 1) + "D".repeat(1);
result += "R".repeat(1) + "D".repeat(dy + 1) + "L".repeat(dx + 1) + "U".repeat(1);
console.log(result);


import { readFileSync } from 'fs'

const main = () => readFileSync('/dev/stdin', 'utf8').slice(0, -1)

const [k, s] = main()
  .split(' ')
  .map(x => +x)
let cnt = 0
for (let i = 0; i <= k; i++) {
  for (let j = 0; j <= k; j++) {
    if (0 <= s - i - j && s - i - j <= k) cnt++
  }
}
console.log(cnt)


def main():
    import sys
    input = sys.stdin.readline
    n,m = map(int,input().split())
    A = list(map(int,input().split()))
    BC = [list(map(int,input().split())) for _ in range(m)]

    BC = sorted(BC,key=lambda x:(x[1]),reverse=True)
    append_list = []
    for b,c in BC:
        if len(append_list)>=n:
            break
        append_list+=[c]*b
    A+=append_list
    A.sort(reverse=True)
    print(sum(A[:n]))

if __name__=='__main__':
    main()


from collections import Counter
N,M = map(int,input().split())
A = Counter(list(map(int,input().split())))
for i in range(M):
    b,c = map(int,input().split())
    if c in A.keys():
        A[c] += b
    else:
        A[c] = b
A = sorted(A.items(),reverse=True)
check = N
ans = 0
for i in A:
    if i[1]<check:
        check -= i[1]
        ans += (i[0] * i[1])
    else:
        ans += i[1] * check
        check = 0
print(ans)


from collections import Counter
N,M = map(int,input().split())
A = Counter(list(map(int,input().split())))
for i in range(M):
    b,c = map(int,input().split())
    if c in A:
        A[c] += b
    else:
        A[c] = b
A = sorted(Counter(A).items(),reverse=True)
check = N
ans = 0
for i in A:
    if i[1]<check:
        check -= i[1]
        ans += (i[0] * i[1])
    else:
        ans += i[1] * check
print(ans)


from collections import Counter
N,M = map(int,input().split())
A = Counter(list(map(int,input().split())))
for i in range(M):
    b,c = map(int,input().split())
    if c in A.keys():
        A[c] += b
    else:
        A[c] = b
A = sorted(A.items(),reverse=True)
check = N
ans = 0
for i in A:
    if i[1]<check:
        check -= i[1]
        ans += (i[0] * i[1])
    else:
        ans += i[1] * check
print(ans)


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.PriorityQueue;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author KharYusuf
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DIntegerCards solver = new DIntegerCards();
        solver.solve(1, in, out);
        out.close();
    }

    static class DIntegerCards {
        public void solve(int testNumber, FastReader s, PrintWriter w) {
            int n = s.nextInt(), m = s.nextInt(), b;
            long sum = 0;
            PriorityQueue<pair<Integer, Integer>> pq = new PriorityQueue<>(n + m, Collections.reverseOrder());
            for (int i = 0; i < n; i++) {
                pq.add(new pair(s.nextInt(), 1));
            }
            for (int i = 0; i < m; i++) {
                b = s.nextInt();
                pq.add(new pair(s.nextInt(), b));
            }
            for (int i = 0; i < n; ) {
                pair<Integer, Integer> p = pq.poll();
                if (p.y >= n - i) {
                    sum += p.x * (long) (n - i);
                    break;
                } else {
                    sum += p.x * (long) p.y;
                    i += p.y;
                }
            }
            w.println(sum);
        }

    }

    static class pair<U extends Comparable<U>, V extends Comparable<V>> implements Comparable<pair<U, V>> {
        public U x;
        public V y;

        public pair(U x, V y) {
            this.x = x;
            this.y = y;
        }

        public int compareTo(pair<U, V> other) {
            if (this.x.compareTo(other.x) != 0) return this.x.compareTo(other.x);
            return this.y.compareTo(other.y);
        }

        public String toString() {
            return x.toString() + "," + y.toString();
        }

        public boolean equals(Object obj) {
            pair<U, V> other = (pair<U, V>) obj;
            return this.x.equals(other.x) && this.y.equals(other.y);
        }

        public int hashCode() {
            return toString().hashCode();
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main {
    static MyReader in = new MyReader();

    public static void main(String[] args) {
        int N = in.i();
        int M = in.i();
        long[] d = new long[N + M];
        for (int i = 0; i < N; i++) {
            d[i] = (in.l() << 17) + 1;
        }
        for (int i = N; i < d.length; i++) {
            d[i] = in.i() + (in.l() << 17);
        }
        Arrays.sort(d);
        long ans = 0;
        for (int i = N + M - 1, j = N - 1; i >= 0 && j >= 0; i--) {
            long b = d[i] & (1 << 17) - 1;
            long c = d[i] >> 17;
            b = Math.min(j + 1, b);
            ans += b * c;
            j -= b;
        }
        out.println(ans);
    }
}

class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        }
        return cbuf[head++];
    }

    void back() {
        head--;
    }

    boolean minus() {
        boolean minus;
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        }
    }

    void skip() {
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        }
    }

    char[] s(final int N) {
        skip();
        char[] s = new char[N];
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
        }
        return s;
    }

    String s() {
        try {
            return readLine();
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }

    int i() {
        boolean minus = minus();
        int n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    long l() {
        boolean minus = minus();
        long n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }
}


import java.util.*;
import java.io.*;
class Main{
    public static void main(String[] args){
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int m = fs.nextInt();
        int[] a = new int[n];
        long sum = 0;
        for(int i=0;i<n;i++){
            a[i] = fs.nextInt();
            sum+=a[i];
        }
        Arrays.sort(a);
        int[][] bc = new int[m][2];
        for(int i=0;i<m;i++){
            bc[i][0] = fs.nextInt();
            bc[i][1] = fs.nextInt();
        }
        Arrays.sort(bc,new Comparator<int[]>(){
          @Override
          public int compare(int[] o1,int[] o2){
            return o2[1]-o1[1];
          }
        });
        int idx = 0;

        for(int i=0;i<m;i++){
            if(a[idx] >= bc[i][1])break;
            int count = bc[i][0];
            int num = bc[i][1];
            for(int j=0;j<count && idx < n;j++){
                if(a[idx] >=num )break;
                sum-=a[idx];
                sum+=num;
                idx++;
            }
            if(idx == n){
                break;
            }
        }
        System.out.println(sum);

    }
    static class FastScanner{
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;

        private boolean hasNextByte(){
            if(ptr < buflen){
                return true;
            }else{
                ptr = 0;
                try{
                    buflen = in.read(buffer);
                }catch(IOException e){
                    e.printStackTrace();
                }
                if(buflen <= 0){
                    return false;
                }
            }
            return true;
        }

        private int readByte(){
            if(hasNextByte())return buffer[ptr++];
            else return -1;
        }

        private boolean isPrintableChar(int c){
            return 33<=c && c<=126;
        }

        public boolean hasNext(){
            while(hasNextByte() && !isPrintableChar(buffer[ptr]))ptr++;
            return hasNextByte();
        }

        public String next(){
            if(!hasNext()) throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while(isPrintableChar(b)){
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public long nextLong(){
            if(!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if(b == '-'){
                minus = true;
                b = readByte();
            }
            if(b < '0' || '9' < b){
                throw new NumberFormatException();
            }
            while(true){
                if('0' <= b && b<='9'){
                    n*=10;
                    n+=b-'0';
                }else if(b==-1 || !isPrintableChar(b)){
                    return minus ? -n : n;
                }else{
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }
        public int nextInt(){
            long nl = nextLong();
            if(nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)throw new NumberFormatException();
            return (int)nl;
        }
        public double nextDouble(){return Double.parseDouble(next());}
    }
}


import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner  = new Scanner(System.in);
		scanner.nextInt();
		final var m = scanner.nextInt();
		scanner.nextLine();
		final String line = scanner.nextLine();

		var str = Arrays.asList(line.split(" "));
		LinkedList<Integer> a = new LinkedList<Integer>();
		a = str.stream()
				.map(Integer::parseInt)
				.collect(Collectors.toCollection(LinkedList::new));
		Collections.sort(a);
		Collections.reverse(a);
		Map<Integer,Integer> map = new HashMap<Integer, Integer>();
		for(var aa = 0; aa < a.size(); aa++) {
			map.put(a.get(aa), aa);
		}
		for(var i = 0; i < m; i++) {
			var b = scanner.nextInt();
			var c = scanner.nextInt();
			var cnt = 0;
			int size = a.size();
			int start = (map.containsKey(c))? map.get(c) : 0;
			for (var aa = start; aa < size; aa++) {
				if(cnt == b) break;
				int current = a.get(aa);
				if(current < c) {
					a.add(aa, c);
					a.remove(size);
					cnt++;
				}
			}

		}
		var sum = 0l;
		for (var aa : a){
			sum += aa;
		}
		System.out.println(sum);
		scanner.close();
	}

}


import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner  = new Scanner(System.in);
//		final var n = scanner.nextInt();
		scanner.nextInt();
		final var m = scanner.nextInt();
		scanner.nextLine();
		final String line = scanner.nextLine();

		var str = Arrays.asList(line.split(" "));
//		str.stream().forEach(r -> System.out.println(r));
		LinkedList<Integer> a = new LinkedList<Integer>();
		a = str.stream()
				.map(Integer::parseInt)
				.collect(Collectors.toCollection(LinkedList::new));
//		long sum = a.stream()
//				.mapToInt(Integer::valueOf)
//				.sum();

//		a.stream().forEach(r -> System.out.println(r));
//		System.out.println();
		Collections.sort(a);
		Collections.reverse(a);
		for(var i = 0; i < m; i++) {
			var b = scanner.nextInt();
			var c = scanner.nextInt();
//			for(var j = 0; j < b; j++) {
//				if (a.get(j) <= c) break;
//				a.set(j, Math.max(a.get(j), c));
//			}
			var cnt = 0;
			int size = a.size();
			for (var aa = 0; aa < size; aa++) {
				if(cnt == b) break;
				int current = a.get(aa);
				if(current < c) {
					a.add(aa, c);
					a.remove(size);
					cnt++;
				}
			}
//			a.stream().forEach(r -> System.out.println(r));
//			System.out.println("-----" + i);

		}
//		System.out.println(sum);
//		a.stream().forEach(r -> System.out.println(r));
//		sum = Math.max(sum, a.stream().mapToInt(Integer::valueOf).sum());
		var sum = 0l;
		for (var aa : a){
			sum += aa;
		}
		System.out.println(sum);
		scanner.close();
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner  = new Scanner(System.in);
//		final var n = scanner.nextInt();
		scanner.nextInt();
		final var m = scanner.nextInt();
		scanner.nextLine();
		final String line = scanner.nextLine();

		var str = Arrays.asList(line.split(" "));
//		str.stream().forEach(r -> System.out.println(r));
		List<Integer> a = new ArrayList<Integer>();
		a = str.stream()
				.map(Integer::parseInt)
				.collect(Collectors.toList());
//		long sum = a.stream()
//				.mapToInt(Integer::valueOf)
//				.sum();

//		a.stream().forEach(r -> System.out.println(r));
//		System.out.println();
		for(var i = 0; i < m; i++) {
			Collections.sort(a);
			var b = scanner.nextInt();
			var c = scanner.nextInt();
			for(var j = 0; j < b; j++) {
				if (a.get(j) >= c) break;
				a.set(j, Math.max(a.get(j), c));
			}
//			a.stream().forEach(r -> System.out.println(r));
//			System.out.println("-----" + i);

		}
//		System.out.println(sum);
//		a.stream().forEach(r -> System.out.println(r));
//		sum = Math.max(sum, a.stream().mapToInt(Integer::valueOf).sum());
		var sum = 0l;
		for (var aa : a){
			sum += aa;
		}
		System.out.println(sum);
		scanner.close();
	}

}