#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define fr(i,n) for(int i=0;i<(n);++i)
#define Fr(i,n) for(int i=1;i<=(n);++i)
#define ifr(i,n) for(int i=(n)-1;i>=0;--i)
#define iFr(i,n) for(int i=(n);i>0;--i)

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    istream& in(cin);
    ostream& out(cout);
    constexpr int N{19};
    int n;
    in>>n;
    vector<int> x(n),y(n);
    set<int> st;
    fr(i,n) in>>x[i]>>y[i],st.insert((x[i]+y[i])&1);
    if(st.size()>1) return cout<<-1<<endl,0;
    bool f=*st.begin();
    ll a{1};
    cout<<39<<endl;
    fr(i,N){
        cout<<a<<" "<<a<<" ";
        a*=3;
    }
    --a;
    vector<int> AN(n),P={1000000000,1000000001};
    cout<<P[f]<<endl;
    fr(i,n){
        if(x[i]+y[i]>0){
            if(x[i]>y[i]){
                AN[i]=1;
                x[i]-=P[f];
            }
            else{
                AN[i]=2;
                y[i]-=P[f];
            }
        }
        else{
            if(x[i]<y[i]){
                AN[i]=3;
                x[i]+=P[f];
            }
            else{
                AN[i]=4;
                y[i]+=P[f];
            }
        }
    }
    fr(i,n){
        ll b=a-x[i]-y[i];
        b/=2;
        vector<short> c(N),L(N),R(N),D(N),U(N);
        //cout<<b<<endl;
        fr(j,N) c[j]=b%3,b/=3;
        if(x[i]>=0){
            //puts("!");
            fr(j,N){
                //cout<<x[i]%3<<" "<<c[j]<<endl;
                if(x[i]%3==0){
                    U[j]=2-c[j];
                    D[j]=c[j];
                }
                else if(x[i]%3==1){
                    if(c[j]==2){
                        L[j]=2;
                        x[i]+=2;
                    }
                    else{
                        R[j]=1;
                        U[j]=1-c[j];
                        D[j]=c[j];
                    }
                }
                else{
                    if(c[j]==0){
                        R[j]=2;
                    }
                    else{
                        L[j]=1;
                        D[j]=c[j]-1;
                        U[j]=2-c[j];
                        ++x[i];
                    }
                }
                x[i]/=3;
            }
        }
        else{
            //puts("?");
            x[i]=-x[i];
            fr(j,N){
                //cout<<x[i]%3<<" "<<c[j]<<endl;
                if(x[i]%3==0){
                    U[j]=2-c[j];
                    D[j]=c[j];
                }
                else if(x[i]%3==1){
                    if(c[j]){
                        L[j]=1;
                        D[j]=c[j]-1;
                        U[j]=2-c[j];
                    }
                    else{
                        R[j]=2;
                        x[i]+=2;
                    }
                }
                else{
                    if(c[j]==2){
                        L[j]=2;
                    }
                    else{
                        R[j]=1;
                        D[j]=c[j];
                        U[j]=1-c[j];
                        ++x[i];
                    }
                }
                x[i]/=3;
            }
        }
        fr(j,N){
            fr(k,L[j]) cout<<"L";
            fr(k,R[j]) cout<<"R";
            fr(k,D[j]) cout<<"D";
            fr(k,U[j]) cout<<"U";
        }
        if(AN[i]==1) cout<<'R';
        if(AN[i]==2) cout<<'U';
        if(AN[i]==3) cout<<'L';
        if(AN[i]==4) cout<<'D';
        cout<<endl;
    }
}

Measured memory_bytes: 256