// ===================================
//   author: M_sea
//   website: http://m-sea-blog.com/
// ===================================
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long

int read() {
    int X=0,w=1; char c=getchar();
    while (c<'0'||c>'9') { if (c=='-') w=-1; c=getchar(); }
    while (c>='0'&&c<='9') X=X*10+c-'0',c=getchar();
    return X*w;
}

const int N=1000+10;
const char ch[4]={'L','R','D','U'};
const char dx[4]={-1,1,0,0},dy[4]={0,0,-1,1};

int n,x[N],y[N];
vector<int> c;

signed main() {
    n=read();
    for (int i=1;i<=n;++i) x[i]=read(),y[i]=read();
    for (int i=2;i<=n;++i)
        if ((abs(x[i]+y[i])&1)!=(abs(x[1]+y[1])&1)) {
            puts("-1"); return 0;
        }
    for (int i=30;~i;--i) c.push_back(1<<i);
    if (!(abs(x[1]+y[1])&1)) c.push_back(1);
    printf("%lu\n",c.size());
    for (int i:c) printf("%lld ",i); puts("");
    for (int i=1;i<=n;++i) {
        int nx=0,ny=0;
        for (int j:c) {
            vector<pair<int,int> > o;
            for (int d=0;d<4;++d) {
                int tx=nx+dx[d]*j,ty=ny+dy[d]*j;
                o.push_back(make_pair(abs(x[i]-tx)+abs(y[i]-ty),d));
            }
            sort(o.begin(),o.end());
            int d=o.begin()->second;
            putchar(ch[d]),nx+=dx[d]*j,ny+=dy[d]*j;
        }
        puts("");
    }
    return 0;
}