import std.stdio, std.conv, std.string, std.algorithm.iteration, std.math, std.range, std.algorithm.sorting, std.algorithm.searching, std.algorithm.mutation, std.array, std.typecons;

struct Point
{
    int x, y;
    int range()
    {
        return abs(x) + abs(y);
    }
}

void main()
{
    int N = readln.chomp.to!int;
    Point[] pointList;
    int[] connectPoint;
    foreach(i; 0..N)
    {
        int[] xy = readln.split.to!(int[]);
        pointList ~= Point(xy[0], xy[1]);
    }
    int maxRange = pointList.maxElement!"a.range".range;
    // writeln(maxRange);

    foreach(point; pointList)
    {
        int outRange = maxRange - point.range;
        if(outRange % 2 == 1)
        {
            writeln("-1");
            return;
        }
        int firstConnectPos = firstConnectPos(point);
        if(firstConnectPos != 0)
            connectPoint ~= firstConnectPos;
        connectPoint ~= point.range;
        if(outRange == 0)
        {
            continue;
        }
        connectPoint ~= point.range + outRange / 2;
    }
    connectPoint.sort;
    connectPoint.length -= connectPoint.uniq.copy(connectPoint).length;
    auto sortedConnectPoint = assumeSorted(connectPoint);
    // writeln(pointList);
    // writeln(sortedConnectPoint);

    int prev = 0;
    writeln(connectPoint[0..$-1].length);
    foreach(c; connectPoint[0..$-1])
    {
        write(c - prev," ");
    }
    writeln("");
    foreach(point; pointList)
    {
        int xCount;
        int yCount; 
        if(abs(point.x) < abs(point.y))
        {
            xCount = sortedConnectPoint.lowerBound(abs(point.x)).length.to!int + 1;
            yCount = sortedConnectPoint.lowerBound(point.range).length.to!int + 1 - xCount;
        }else{
            yCount = sortedConnectPoint.lowerBound(abs(point.y)).length.to!int + 1;
            xCount = sortedConnectPoint.lowerBound(point.range).length.to!int + 1 - yCount;
        }
        // write(xCount);
        // write(" ");
        // write(yCount);
        // writeln(" ");
        if(abs(point.x) < abs(point.y))
        {
            foreach(i; 0..xCount)
            {
                write(point.x > 0 ? "R" : "L");
            }
            foreach(i; 0..yCount)
            {
                write(point.y > 0 ? "U" : "D");
            }
        }else{
            foreach(i; 0..yCount)
            {
                write(point.y > 0 ? "U" : "D");
            }
            foreach(i; 0..xCount)
            {
                write(point.x > 0 ? "R" : "L");
            }
        }
        writeln("");
   }
}
int firstConnectPos(Point point)
{
    return abs(point.x) < abs(point.y) ? abs(point.x) : abs(point.y);
}