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

pair<long long, long long> p[1001];
int md[2];

#define x first
#define y second
vector<long long> hi;
string ans[1001];

int main(){
    int n;
    scanf("%d", &n);
    for(int i=0;i<n;i++){
        scanf("%lld%lld", &(p[i].x), &(p[i].y));
        md[(p[i].x + p[i].y) & 0x1]++;
    }
    if(md[0] != n && md[1] != n){
        printf("-1\n");
        return 0;
    }
    long long msk = 1;
    if(md[0] == n){
        hi.push_back(1); hi.push_back(1);
        for(int i=0;i<n;i++){
            long long xx = abs(p[i].x), yy = abs(p[i].y);
            if((xx & msk) == 0 && (yy & msk) == 0){
                if(xx%4 == 0 && yy%4 == 0){
                    p[i].x += 2;
                    ans[i].push_back('L'); ans[i].push_back('L');
                }else if(xx%4 == 2 && yy%4 == 2){
                    p[i].x += 2;
                    ans[i].push_back('L'); ans[i].push_back('L');
                }else{
                    ans[i].push_back('R'); ans[i].push_back('L');
                }
            }else{
                if(xx%4 == 1){
                    if(p[i].x > 0){
                        p[i].x += 1; ans[i].push_back('L');
                    }else{
                        p[i].x -= 1; ans[i].push_back('R');
                    }
                }else{
                    if(p[i].x > 0){
                        p[i].x -= 1; ans[i].push_back('R');
                    }else{
                        p[i].x += 1; ans[i].push_back('L');
                    }
                }
                if(yy%4 == 1){
                    if(p[i].y > 0){
                        p[i].y -= 1; ans[i].push_back('U');
                    }else{
                        p[i].y += 1; ans[i].push_back('D');
                    }
                }else{
                    if(p[i].y > 0){
                        p[i].y += 1; ans[i].push_back('D');
                    }else{
                        p[i].y -= 1; ans[i].push_back('U');
                    }
                }
            }
            p[i].x /= 2; p[i].y /= 2;
        }
    }else{
        hi.push_back(1);
        for(int i=0;i<n;i++){
            long long xx = abs(p[i].x), yy = abs(p[i].y);
            if((xx % 2) == 0){
                bool b1 = (xx % 4 == 0);
                bool b2 = (yy % 4 == 1);
                bool b3 = (p[i].y > 0);
                if(b1 ^ b2 ^ b3){
                    p[i].y += 1; ans[i].push_back('D');
                }else{
                    p[i].y -= 1; ans[i].push_back('U');
                }
            }else{
                bool b1 = (yy % 4 == 0);
                bool b2 = (xx % 4 == 1);
                bool b3 = (p[i].x > 0);
                if(b1 ^ b2 ^ b3){
                    p[i].x += 1; ans[i].push_back('L');
                }else{
                    p[i].x -= 1; ans[i].push_back('R');
                }
            }
            p[i].x /= 2; p[i].y /= 2;
        }
    }
    long long gop = 1;
    for(int ii=1;;ii++){
        gop *= 2;
        hi.push_back(gop);
        bool is_finmode = true;
        for(int i=0;i<n;i++){
            if(abs(p[i].x) + abs(p[i].y) != 1){
                is_finmode = false;
                break;
            }
        }
        if(is_finmode){
            for(int i=0;i<n;i++){
                if(p[i].x < 0){
                    ans[i].push_back('L');
                }
                if(p[i].x > 0){
                    ans[i].push_back('R');
                }
                if(p[i].y < 0){
                    ans[i].push_back('D');
                }
                if(p[i].y > 0){
                    ans[i].push_back('U');
                }
            }
            break;
        }
        for(int i=0;i<n;i++){
            //printf("%lld %lld\n", p[i].x, p[i].y);
            long long xx = abs(p[i].x), yy = abs(p[i].y);
            if((xx % 2) == 0){
                bool b1 = (xx % 4 == 0);
                bool b2 = (yy % 4 == 1);
                bool b3 = (p[i].y > 0);
                if(b1 ^ b2 ^ b3){
                    p[i].y += 1; ans[i].push_back('D');
                }else{
                    p[i].y -= 1; ans[i].push_back('U');
                }
            }else{
                bool b1 = (yy % 4 == 0);
                bool b2 = (xx % 4 == 1);
                bool b3 = (p[i].x > 0);
                if(b1 ^ b2 ^ b3){
                    p[i].x += 1; ans[i].push_back('L');
                }else{
                    p[i].x -= 1; ans[i].push_back('R');
                }
            }
            p[i].x /= 2; p[i].y /= 2;
        }
        //printf("\n");
    }
    printf("%d\n", (int)hi.size());
    for(int i=0;i<(int)hi.size();i++){
        printf("%lld ", hi[i]);
    }
    printf("\n");
    for(int i=0;i<n;i++){
        printf("%s\n", ans[i].c_str());
    }
}


Measured memory_bytes: 384