Snuke is introducing a robot arm with the following properties to his factory:
 - The robot arm consists of m sections and m+1 joints. The sections are numbered 1, 2, ..., m, and the joints are numbered 0, 1, ..., m. Section i connects Joint i-1 and Joint i. The length of Section i is d_i.
 - For each section, its mode can be specified individually. There are four modes: L, R, D and U. The mode of a section decides the direction of that section. If we consider the factory as a coordinate plane, the position of Joint i will be determined as follows (we denote its coordinates as (x_i, y_i)):
 - (x_0, y_0) = (0, 0).
 - If the mode of Section i is L, (x_{i}, y_{i}) = (x_{i-1} - d_{i}, y_{i-1}).
 - If the mode of Section i is R, (x_{i}, y_{i}) = (x_{i-1} + d_{i}, y_{i-1}).
 - If the mode of Section i is D, (x_{i}, y_{i}) = (x_{i-1}, y_{i-1} - d_{i}).
 - If the mode of Section i is U, (x_{i}, y_{i}) = (x_{i-1}, y_{i-1} + d_{i}).
Snuke would like to introduce a robot arm so that the position of Joint m can be matched with all of the N points (X_1, Y_1), (X_2, Y_2), ..., (X_N, Y_N) by properly specifying the modes of the sections.
Is this possible?
If so, find such a robot arm and how to bring Joint m to each point (X_j, Y_j).

-----Constraints-----
 - All values in input are integers.
 - 1 \leq N \leq 1000
 - -10^9 \leq X_i \leq 10^9
 - -10^9 \leq Y_i \leq 10^9

-----Partial Score-----
 - In the test cases worth 300 points, -10 \leq X_i \leq 10 and -10 \leq Y_i \leq 10 hold.

-----Input-----
Input is given from Standard Input in the following format:
N
X_1 Y_1
X_2 Y_2
:
X_N Y_N

-----Output-----
If the condition can be satisfied, follow the following format. If the condition cannot be satisfied, print -1.
m
d_1 d_2 ... d_m
w_1
w_2
:
w_N

m and d_i are the configurations of the robot arm. Refer to the problem statement for what each of them means.
Here, 1 \leq m \leq 40 and 1 \leq d_i \leq 10^{12} must hold. Also, m and d_i must all be integers.
w_j is a string of length m that represents the way to bring Joint m of the robot arm to point (X_j, Y_j).
The i-th character of w_j should be one of the letters L, R, D and U, representing the mode of Section i.

-----Sample Input-----
3
-1 0
0 3
2 -1

-----Sample Output-----
2
1 2
RL
UU
DR

In the given way to bring Joint m of the robot arm to each (X_j, Y_j), the positions of the joints will be as follows:
 - To (X_1, Y_1) = (-1, 0): First, the position of Joint 0 is (x_0, y_0) = (0, 0). As the mode of Section 1 is R, the position of Joint 1 is (x_1, y_1) = (1, 0). Then, as the mode of Section 2 is L, the position of Joint 2 is (x_2, y_2) = (-1, 0).
 - To (X_2, Y_2) = (0, 3): (x_0, y_0) = (0, 0), (x_1, y_1) = (0, 1), (x_2, y_2) = (0, 3).
 - To (X_3, Y_3) = (2, -1): (x_0, y_0) = (0, 0), (x_1, y_1) = (0, -1), (x_2, y_2) = (2, -1).

Difficulty: interview

Starter code:

Solutions:
N = int(input())
P = [tuple(map(int, input().split())) for _ in range(N)]

odd = []
for (x, y) in P:
    dist = abs(x) + abs(y)
    odd.append(dist % 2 != 0)

valid = True
even = False
if all(odd):
    pass
elif not any(odd):
    even = True
else:
    valid =False

if valid:

    M = 31
    if even:
        print((M+1))
        print((*([1 << m for m in range(M)] + [1])))
    else:
        print(M)
        print((*[1 << m for m in range(M)]))

    for (x, y) in P:
        u = x + y
        v = x - y
        if even:
            u += 1
            v += 1
        if u >= 0 and v >= 0:
            A = 'R'
            B = 'U'
            C = 'D'
            D = 'L'
        elif u >= 0 and v < 0:
            v *= -1
            A = 'U'
            B = 'R'
            C = 'L'
            D = 'D'
        elif u < 0 and v >= 0:
            u *= -1
            A = 'D'
            B = 'L'
            C = 'R'
            D = 'U'
        elif u < 0 and v < 0:
            u *= -1
            v *= -1
            A = 'L'
            B = 'D'
            C = 'U'
            D = 'R'

        ans = ''
        wa = ((1 << M) - 1 - u) // 2
        sa = ((1 << M) - 1 - v) // 2
        for i in range(M):
            check = str(wa >> i & 1) + str(sa >> i & 1)
            if check == '00':
                ans += A
            elif check == '01':
                ans += B
            elif check == '10':
                ans += C
            elif check == '11':
                ans += D
        if even:
            ans += 'L'
        print(ans)
else:
    print((-1))


def main():
    N = int(input())
    xy = []
    for _ in range(N):
        x, y = list(map(int, input().split()))
        xy.append((x, y))
    mod = sum(xy[0]) % 2
    for x, y in xy:
        if (x + y) % 2 != mod:
            print((-1))
            return
    print((33 - mod))
    D = [2 ** i for i in range(31, -1, -1)]
    if mod == 0:
        D.append(1)
    print((' '.join(map(str, D))))

    for x, y in xy:
        temp = []
        for d in D:
            if x >= y and x + y >= 0:
                temp.append("R")
                x -= d
            elif x < y and x + y >= 0:
                temp.append("U")
                y -= d
            elif x >= y and x + y < 0:
                temp.append("D")
                y += d
            else:
                temp.append("L")
                x += d
        print((''.join(temp)))


main()


n = int(input())
xy = []
flag = "f"
for i in range(0,n):
    X,Y = map(int,input().split())
    xy.append((X,Y))
    if i == 0:
        m = (X+Y)%2
    if m != (X+Y)%2:
        flag = "t"
if flag == "t":
    print(-1)
    return

d = [2**i for i in range(31,-1,-1)]

if m == 0:
    d.append(1)

print(len(d))
for i in range(0,len(d)):
    print(d[i],end = " ")
print()
for i in range(0,n):
    x,y = xy[i]
    w = ""
    for j in range(0,len(d)):
        if y <= x and  y >= -x:
            w += "R"
            x -= d[j]
        elif y >= x and y >= -x:
            w += "U"
            y -= d[j]
        elif y > x and y < -x:
            w += "L"
            x += d[j]
        else:
            w += "D"
            y += d[j]
    print(w)


inp = [[int(x) for x in input().split()] for _ in range(int(input()))]
inpsum = sum(map(lambda ij: abs(ij[0]+ij[1]) % 2, inp))
if not (inpsum == len(inp) or inpsum == 0):
    print(-1)
    return

seeds = ([] if inpsum == len(inp) else [1]) + [1 << i for i in range(0, 32)]
# print(inp)

print(len(seeds))
print(' '.join(map(str, reversed(seeds))))

for x, y in inp:
    for k in reversed(seeds):
        res = ''
        if abs(x) > abs(y):
            if x > 0:
                res = 'R'
                x -= k
            else:
                res = 'L'
                x += k
        else:
            if y > 0:
                res = 'U'
                y -= k
            else:
                res = 'D'
                y += k
        # print((x,y))
        print(res, end='')
    print('')


import sys


# 一つ前の座標と、方向を返す
def f(x, y, i):
    d = 1 << i
    if y > x and y > -x:
        return x, y - d, "U"
    elif y < x and y > -x:
        return x - d, y, "R"
    elif y < x and y < -x:
        return x, y + d, "D"
    else:
        return x + d, y, "L"


N = int(input())
X = []
Y = []
mx = 0
for i in range(N):
    x, y = [int(x) for x in input().split()]
    mx = max(abs(x) + abs(y), mx)
    X.append(x)
    Y.append(y)

s = (X[0] + Y[0]) % 2
for i in range(N):
    if s != (X[i] + Y[i]) % 2:
        print((-1))
        return

# s == 1 のとき：D:[1,2,4,8,...]
# s == 0 のとき：D:[1,1,2,4,8,...]

if s == 0:
    X = [x - 1 for x in X]

D = []
d = 1
while d < mx:
    D.append(d)
    d = d * 2

m = len(D)
print((m if s != 0 else m + 1))
if s == 0:
    D = [1] + D
print((" ".join([str(d) for d in D])))

for i in range(N):
    x, y = X[i], Y[i]
    dirs = []
    for j in range(m - 1, -1, -1):
        x, y, dir = f(x, y, j)
        dirs.append(dir)
    if s == 0:
        dirs.append("R")
    print(("".join(dirs[::-1])))


N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
MOD = sum(XY[0]) % 2

for x, y in XY:
    if MOD != (x + y) % 2:
        print((-1))
        return

m = 33 - MOD
print(m)
D = [2 ** i for i in range(31, -1, -1)]
if MOD == 0:
    D.append(1)

print((" ".join(map(str, D))))
for x, y in XY:
    w = ""
    for d in D:
        if x + y >= 0 and x - y >= 0:
            w += "R"
            x -= d
        elif x + y < 0 and x - y >= 0:
            w += "D"
            y += d
        elif x + y >= 0 and x - y < 0:
            w += "U"
            y -= d
        else:
            w += "L"
            x += d

    print(w)


# coding:utf-8

import sys
input = sys.stdin.readline
INF = float('inf')


def inpl(): return list(map(int, input().split()))


def move_uv(x, y):
    ut = x + y
    vt = x - y
    command = ''
    u, v = 0, 0
    for i in range(len(D)):
        if u <= ut and v <= vt:
            command += 'R'
            u += D[i]
            v += D[i]
        elif u <= ut and v > vt:
            command += 'U'
            u += D[i]
            v -= D[i]
        elif u > ut and v <= vt:
            command += 'D'
            u -= D[i]
            v += D[i]
        else:
            command += 'L'
            u -= D[i]
            v -= D[i]

    return command


N = int(input())
point = []
max_length = 0
for i in range(N):
    x, y = inpl()
    max_length = max(max_length, abs(x) + abs(y))
    point.append([x, y])

parity = sum(point[0]) % 2
judge = True
for p in point:
    if parity ^ sum(p) % 2:
        judge = False
        break

if not judge:
    print((-1))
else:
    D = [2 ** i for i in range(len(bin(max_length)) - 1)]
    D.reverse()

    # X + Yが偶数の時は長さ1の腕を足す
    if parity == 0:
        D.append(1)
    print((len(D)))
    print((' '.join(map(str, D))))
    for i in range(N):
        print((move_uv(point[i][0], point[i][1])))


from functools import reduce
import math

n = int(input())
coord = [tuple(map(int, input().split())) for i in range(n)]

# parity check and get max
x, y = coord[0]
p = (x + y) & 1
limit = 0
for x, y in coord:
    if p != (x + y) & 1:
        print(-1)
        return
    lim = abs(x) + abs(y)
    if lim > limit:
        limit = lim

limit = round(math.log2(limit))
if p == 1:
    d = [2 ** i for i in reversed(range(limit + 1))]
else:
    d = [1] + [2 ** i for i in reversed(range(limit + 1))]

print(len(d))
print(reduce((lambda acc, dist: str(acc) + " " + str(dist)), d))

for x, y in coord:
    u = x + y
    v = x - y

    command = ""
    for i in range(len(d)):
        if u >= 0 and v >= 0:
            command += "R"
            u -= d[i]
            v -= d[i]
        elif u >= 0 > v:
            command += "U"
            u -= d[i]
            v += d[i]
        elif u < 0 <= v:
            command += "D"
            u += d[i]
            v -= d[i]
        elif u < 0 and v < 0:
            command += "L"
            u += d[i]
            v += d[i]

    print(command)

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def func(X, Y, D):
    ans = ""
    x, y = 0, 0
    for i in range(len(D)):
        d = D[i]

        best_j = 0
        best = INF
        for j in range(4):
            nx, ny = x + dx4[j] * d - X, y + dy4[j] * d - Y
            if abs(nx) + abs(ny) < best:
                best = abs(nx) + abs(ny)
                best_j = j

        x, y = x + dx4[best_j] * d, y + dy4[best_j] * d
        ans += "RULD"[best_j]

    assert(x == X and y == Y)
    return ans


def main():
    N = int(input())
    points = []
    for i in range(N):
        X, Y = list(map(int, input().split()))
        points.append((X, Y))

    for i in range(len(points) - 1):
        x1, y1 = points[i]
        x2, y2 = points[i + 1]
        if (x1 + y1) % 2 != (x2 + y2) % 2:
            print("-1")
            return

    D = [2 ** i for i in range(33)][::-1]
    if sum(points[0]) % 2 == 0:
        D.append(1)

    print((len(D)))
    print((*D))

    for x, y in points:
        print((func(x, y, D)))


def __starting_point():
    main()

__starting_point()

# http://tutuz.hateblo.jp/entry/2018/12/09/220715

inf = float('inf')

n = int(input())
coordinates = [tuple(map(int, input().split())) for _ in range(n)]

parity = None
can_make = True
for coordinate in coordinates:
    if parity is None:
        parity = sum(coordinate) % 2
    else:
        if parity != sum(coordinate) % 2:
            can_make = False
            break

if not can_make:
    print(-1)
    return
    # 到達可能な頂点はxy座標の和のパリティが一致している必要がある

if parity == 0:
    d = [pow(2, i) for i in range(31 + 1)] + [1]
    # 奇数は1だけなので、1を追加して、全ての腕の合計が偶数になるようにする
else:
    d = [pow(2, i) for i in range(31 + 1)]
    # 奇数は1だけなので、全ての腕の合計は奇数になる
d.sort(reverse=True)

ans = []
for x, y in coordinates:
    u = x + y
    v = x - y
    # 45度回転する
    # u,vの最大値はx,yの2倍=2*10**9
    # 2 ** 31 > 2 * (10 ** 9) なので、2**31までの二冪で大丈夫そう
    # [1, 2, ..., 2 ** 31]
    # L(-d,-d)R(+d,+d)U(+d,-d)D(-d,+d)
    # なので、一つのdで、uでは加算、vでは減算などでき、二冪一セットで足りる
    curu, curv = 0, 0
    ops = ''
    for dd in d:
        dist = inf
        op = ''
        det_du, det_dv = 0, 0
        for c, (du, dv) in zip('LRDU', [(-1, -1), (1, 1), (-1, 1), (1, -1)]):
            t = abs(curu + du * dd - u) + abs(curv + dv * dd - v)
            if dist > t:
                op = c
                dist = t
                det_du = du
                det_dv = dv
        ops += op
        curu += det_du * dd
        curv += det_dv * dd
    if (curu, curv) == (u, v):
        ans.append(ops)
    else:
        print(-1)
        # print('不一致', curx, cury, x, y)

print(len(d))
print(*d)
print(*ans, sep='\n')


def solve(n, x, y):
    ws = []
    S = set()
    for i in range(n):
        u = x[i] + y[i]
        v = x[i] - y[i]
        S.add(u % 2)
        if len(S) > 1:
            print(-1)
            return
        ds = [2**k for k in range(30, -1, -1)]
        if u % 2 == 0:
            ds.append(1)
        w = ""
        for d in ds:
            if (u >= 0) and (v >= 0):
                w += "R"
                u, v = u-d, v-d
            elif (u <= 0) and (v <= 0):
                w += "L"
                u, v = u+d, v+d
            elif (u >= 0) and (v <= 0):
                w += "U"
                u, v = u-d, v+d
            else: # (u < 0) and (v > 0)
                w += "D"
                u, v = u+d, v-d
        ws.append(w)
    print(len(ds)) # m
    print(" ".join(map(str, ds)))
    print("\n".join(ws))

n = int(input())
x = [0] * n
y = [0] * n
for i in range(n):
    x[i], y[i] = map(int, input().split())
solve(n, x, y)

import sys

N = int(input())
coord = [tuple(map(int, input().split())) for _ in range(N)]
parity = (coord[0][0] + coord[0][1]) % 2
flag = False
for c in coord[1:]:
    if (c[0] + c[1]) % 2 != parity:
        flag = True
        break
if flag:
    print(-1)
    return
D = [2**(31-i) for i in range(32)]
if parity == 0:
    D.append(1)
print(len(D))
print(*D, sep=' ')
for c in coord:
    w = ''
    pos = [0, 0]
    for d in D:
        dif = [c[0] - pos[0], c[1] - pos[1]]
        cands = [(abs(dif[0] - d) + abs(dif[1]), 'R'), (abs(dif[0] + d) + abs(dif[1]), 'L'), (abs(dif[0]) + abs(dif[1] - d), 'U'), (abs(dif[0]) + abs(dif[1] + d), 'D')]
        select = min(cands)
        w += select[1]
        if select[1] == 'R':
            pos[0] += d
        elif select[1] == 'L':
            pos[0] -= d
        elif select[1] == 'U':
            pos[1] += d
        else:
            pos[1] -= d
    print(w)

from sys import stdin, exit
import numpy as np

N, *XY = map(int, stdin.read().split())
XY = np.array(XY).reshape(N, 2)

XYsum = np.abs(XY).sum(axis=1)
if any(XYsum % 2 != XYsum[0] % 2):
    print(-1)
    return

xymax = XYsum.max()
d = [] if xymax % 2 == 1 else [1]
for i in range(41):
    di = 2**i
    if xymax < di:
        break
    d.append(di)
d.reverse()
print(len(d))
print(' '.join(map(str, d)))

for X, Y in XY:
    x, y = 0, 0
    w = ''
    for di in d:
        if abs(X-(x-di)) + abs(Y-y) <= di:
            w += 'L'
            x -= di
        elif abs(X-(x+di)) + abs(Y-y) <= di:
            w += 'R'
            x += di
        elif abs(X-x) + abs(Y-(y-di)) <= di:
            w += 'D'
            y -= di
        else:
            w += 'U'
            y += di
    print(w)

N = int(input())
Pi = []
for i in range(N):
    d = list(map(int, input().split()))
    Pi.append(d)
 
# validation
for p in Pi[1:]:
    if (p[0] + p[1]) % 2 != (Pi[0][0] + Pi[0][1]) % 2:
        print((-1))
        return
 
# create arms
Ai = []
if (Pi[0][0] + Pi[0][1]) % 2 == 0:
    Ai.append(1)
for i in range(0, 32):
    Ai.append(2 ** i)
 
def find_arm_pattern(arms, target_x, target_y):
    result = ""
    x = 0
    y = 0
    for a in arms:
        dx = target_x - x
        dy = target_y - y
        if abs(dx) >= abs(dy):
            if dx > 0:
                result += "R"
                x += a
            else:
                result += "L"
                x -= a
        else:
            if dy > 0:
                result += "U"
                y += a
            else:
                result += "D"
                y -= a
    if x == target_x and y == target_y:
        return result
    return None
 
 
arms = list(reversed(Ai))
results = []
for p in Pi:
    r = find_arm_pattern(arms, p[0], p[1])
    results.append(r)
txt = str(arms)
print((len(arms)))
print((txt[1:-1].replace(",", "")))
for r in results:
    print(r)


def cal(i,j):
    if i==1 and j==1: return "R"
    elif i==1 and j==0: return "U"
    elif i==0 and j==1: return "D"
    elif i==0 and j==0: return "L"



import sys

N=int(input())


a=[list(map(int,input().split())) for i in range(N)]
mod=sum(a[0])%2
for i in range(N):
    if sum(a[i])%2!=mod:
        print(-1)
        return

if mod==0:
    a=[[ a[i][0]-1 ,a[i][1] ] for i in range(N)]

if mod==0:
    print(32)
    print(1,end=" ")
    for i in range(30): print(2**i, end=" ")
    print(2**30)
else:
    print(31)
    for i in range(30): print(2**i, end=" ")
    print(2**30)

for i in range(N):
    [x,y]=a[i]
    u=bin((x+y+2**31-1)//2)[2:].zfill(31)
    v=bin((x-y+2**31-1)//2)[2:].zfill(31)
    
    if mod==0: s="R"
    else: s=""

    for i in range(30,-1,-1): s=s+cal( int(u[i]),int(v[i]) )
    
    print(s)

def robot_arms(N: int, XY: list) -> tuple:
    odd, even = 0, 0
    max_dist = 0
    for x, y in XY:
        ax, ay = abs(x), abs(y)
        if (ax + ay) % 2 == 0:
            even += 1
        else:
            odd += 1

        if max_dist < ax + ay:
            max_dist = ax + ay

    if odd == 0:
        # 偶数のみの場合は長さ 1 のアームが余計に必要
        arms = [1]
    elif even == 0:
        # 奇数のみの場合は 2 のべき乗の長さのアームだけで OK
        arms = []
    else:
        # 偶奇ごちゃ混ぜの場合は不成立
        return [], []

    # アームの準備
    tmp, sum_tmp = 1, sum(arms)
    while sum_tmp < max_dist:
        arms.append(tmp)
        sum_tmp += tmp
        tmp <<= 1

    # 各点へ腕を伸ばすための操作方法を決めていく
    ops = []
    for x, y in XY:
        op = ''
        # 決定操作
        # 長さが 2^m までの腕を使って届く範囲は綺麗な菱形になっている。
        # 点(x,y)から原点に向かって考える。
        # 腕の長い物から使っていき、使っていない腕で届く範囲に入っていく様に
        # 腕の方向を決定していく。
        # ただし、逆順に決定していくので、決定過程での方向と実際に出力すべき
        # 方向は逆になっていることに注意
        left_len = sum(arms)
        nx, ny = x, y
        for arm in reversed(arms):
            left_len -= arm
            if abs(nx + arm) + abs(ny) <= left_len:
                op = 'L' + op
                nx, ny = nx + arm, ny
            elif abs(nx - arm) + abs(ny) <= left_len:
                op = 'R' + op
                nx, ny = nx - arm, ny
            elif abs(nx) + abs(ny + arm) <= left_len:
                op = 'D' + op
                nx, ny = nx, ny + arm
            elif abs(nx) + abs(ny - arm) <= left_len:
                op = 'U' + op
                nx, ny = nx, ny - arm
        ops.append(op)

    return arms, ops


def __starting_point():
    N = int(input())
    XY = [tuple(map(int, input().split())) for _ in range(N)]
    ans = robot_arms(N, XY)

    if len(ans[0]) == 0:
        print((-1))
    else:
        d, w = ans
        print((len(d)))
        print((' '.join(map(str, d))))
        for ww in w:
            print(ww)

__starting_point()

n=int(input())
xy=[list(map(int,input().split()))for _ in range(n)]
g=39
a=[]
if sum(xy[0])%2==0:a.append(1)
for i in range(g):a.append(1<<i)
g=len(a)
for x,y in xy:
  if (x+y)%2!=sum(xy[0])%2:print(-1);return()
print(g)
print(*a)
def f(s):
  t=s
  ans=[]
  for i in a[::-1]:
    if abs(t-i)<abs(t+i):
      ans.append(-i)
      t-=i
    else:
      ans.append(i)
      t+=i
  return ans[::-1]
for x,y in xy:
  xpy=f(-(x+y))
  xmy=f(-(x-y))
  ans=""
  for p,m in zip(xpy,xmy):
    if 0<p and 0<m:ans+="R"
    if p<0 and m<0:ans+="L"
    if 0<p and m<0:ans+="U"
    if p<0 and 0<m:ans+="D"
  print(ans)

N = int(input())
X = []
Y = []
for _ in range(N):
    x, y = list(map(int, input().split()))
    X.append(x)
    Y.append(y)

# (x + y) % 2 が全部同じじゃなかったらどう頑張ってもむり
if len(set([(x + y) % 2 for x, y in zip(X, Y)])) != 1:
    print((-1))
    return


def directions_str(fx, fy, tx, ty, arm):
    if fx == tx and fy == ty:
        return ''
    if abs(fx - arm - tx) + abs(fy - ty) < arm:
        return 'L' + directions_str(fx=fx - arm, fy=fy, tx=tx, ty=ty, arm=arm // 2)
    if abs(fx + arm - tx) + abs(fy - ty) < arm:
        return 'R' + directions_str(fx=fx + arm, fy=fy, tx=tx, ty=ty, arm=arm // 2)
    if abs(fx - tx) + abs(fy - arm - ty) < arm:
        return 'D' + directions_str(fx=fx, fy=fy - arm, tx=tx, ty=ty, arm=arm // 2)
    if abs(fx - tx) + abs(fy + arm - ty) < arm:
        return 'U' + directions_str(fx=fx, fy=fy + arm, tx=tx, ty=ty, arm=arm // 2)


# 全部 (x + y) % 2 == 1 なら、2^n, 2^(n-1), ..., 2, 1 って腕を作れば (x+y) <= 2^(n+1)-1 まではどこでも行ける。
# 全部 (x + y) % 2 == 0 なら、上記から 1 だけ伸ばせばどこでも行ける。
arms = []
for n in range(39):
    arms.append(2 ** n)
    if 2 ** n > 10 ** 9:
        break
arms.sort(reverse=True)

if (X[0] + Y[0]) % 2 == 1:
    print((len(arms)))
    print((' '.join(map(str, arms))))
    for x, y in zip(X, Y):
        print((directions_str(fx=0, fy=0, tx=x, ty=y, arm=arms[0])))
else:
    arms.append(1)
    print((len(arms)))
    print((' '.join(map(str, arms))))
    for x, y in zip(X, Y):
        print((directions_str(fx=0, fy=0, tx=x, ty=y + 1, arm=arms[0]) + 'D'))


def solution(x,y):
    ans = ''
    nowx, nowy = 0,0
    preX = [0]*31
    preY = [0]*31
    for i in range(31):
        if nowx < x:
            nowx += 2**(30-i)
            preX[i] = 1
        else:
            nowx -= 2**(30-i)
            preX[i] = -1
        if nowy < y:
            nowy += 2**(30-i)
            preY[i] = 1
        else:
            nowy -= 2**(30-i)
            preY[i] = -1
    for i in range(31):
        if preX[i] == -1 and preY[i] == -1:
            ans += 'L'
        elif preX[i] == 1 and preY[i] == 1:
            ans += 'R'
        elif preX[i] == -1 and preY[i] == 1:
            ans += 'D'
        else:
            ans += 'U'
    return ans
N = int( input())
X = [0]*N
Y = [0]*N
x, y = map( int, input().split())
X[0] = x
Y[0] = y
evod = (x+y)%2
Flag = True
for i in range(1,N):
    x, y = map( int, input().split())
    X[i] = x
    Y[i] = y
    if (x+y)%2 != evod:
        Flag = False

if Flag:
    D = [2**i for i in range(30,-1,-1)]
    if evod == 1:
        print(31)
        print(' '.join(map(str,D)))
        for i in range(N):
            print( solution(X[i]+Y[i],X[i]-Y[i]))
    else:
        print(32)
        D.append(1)
        print(' '.join(map(str,D)))
        for i in range(N):
            print( solution(X[i]+Y[i]-1,X[i]-1-Y[i]) + 'R')
else:
    print(-1)

#!/usr/bin/env python3
import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, X: "List[int]", Y: "List[int]"):
    parities = {(Xi + Yi) % 2 for Xi, Yi in zip(X, Y)}
    if len(parities) > 1:
        print((-1))
        return

    d = [1 << i for i in range(39)]
    if next(iter(parities)) == 0:
        d.append(1)

    print((len(d)))
    print((*d))

    x0 = -sum(d)
    for Xi, Yi in zip(X, Y):
        u = (Xi - x0 - Yi) // 2
        v = (Xi - x0 + Yi) // 2
        modes = []
        for i in range(39):
            ui = (u & (1 << i)) != 0
            vi = (v & (1 << i)) != 0
            modes.append({
                (False, False): "L",
                (False, True): "U",
                (True, False): "D",
                (True, True): "R",
            }[ui, vi])
        if len(d) > len(modes):
            modes.append("L")
        print(("".join(modes)))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    X = [int()] * (N)  # type: "List[int]"
    Y = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        X[i] = int(next(tokens))
        Y[i] = int(next(tokens))
    solve(N, X, Y)


def __starting_point():
    main()

__starting_point()

n = int(input())
x = [0 for i in range(0, n)]
y = [0 for i in range(0, n)]

for i in range(0, n):
    x[i], y[i] = [int(i) for i in input().split(" ")]

mod2 = (x[0] + y[0]) % 2
imp = False

for i in range(1, n):
    if (x[i] + y[i]) % 2 != mod2:
        print(-1)
        imp = True
        break
        
if not imp:
    if mod2 == 0:
        x = [i + 1 for i in x]

    u = [x[i] + y[i] for i in range(0, n)]
    v = [x[i] - y[i] for i in range(0, n)]

    mode = ["L", "D", "U", "R"]
    m = 31

    if mod2 == 0:
        print(m + 1)
        print("1 " + " ".join([str(2**(i - 1)) for i in range(1, m + 1)]))
    else:
        print(m)
        print(" ".join([str(2**(i - 1)) for i in range(1, m + 1)]))

    for i in range(0, n):
        w = ""
        if mod2 == 0:
            w = "L"
        ui = (u[i] + 2**m - 1) // 2
        vi = (v[i] + 2**m - 1) // 2
        for l in range(0, m):
            ul = ui % 2
            ui = ui // 2
            vl = vi % 2
            vi = vi // 2
            w += mode[ul * 2+ vl]
        print(w)

n = int(input())
xy = [tuple(int(x) for x in input().split()) for _ in range(n)]

mod = (xy[0][0] + xy[0][1]) % 2
for x, y in xy:
    if (x + y) % 2 != mod:
        print((-1))
        return

print((33 - mod))
D = [2 ** i for i in range(31, -1, -1)]
if mod == 0:
    D.append(1)

print((" ".join(map(str, D))))

for x, y in xy:
    temp = []
    for d in D:
        if x >= y and x + y >= 0:
            temp.append("R")
            x -= d
        elif x < y and x + y >= 0:
            temp.append("U")
            y -= d
        elif x >= y and x + y < 0:
            temp.append("D")
            y += d
        else:
            temp.append("L")
            x += d
    print((''.join(temp)))




# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N = int(input())
XY = [list(map(int,input().split())) for _ in range(N)]

# x + y のパリティが同一かチェック, 異なる座標が存在する場合は実現不可能
p = set()
for i in range(N):
    p.add((XY[i][0] + XY[i][1]) % 2)
if len(p) > 1:
    print((-1))
    return

# 腕の長さを1,2,4,8... で考えると, パリティ1を実現できる.
# 与えられた座標のパリティが0の場合, X座標を-1し, パリティ1の場合に帰着する(あとでX+1する)
if 0 in p:
    for i in range(N):
        XY[i][0] -= 1

# アームを準備
D = []
for i in range(35):
    D.append(2**i)
D.sort(reverse=True)

Ans = []
# 順番に計算
for i in range(N):
    x,y = XY[i][0],XY[i][1]
    x0,y0 = 0,0
    ans = ""
    # 原点を中心にX字で分割される領域の (上下左右) どちらかを判断し, 移動させ, 都度原点を調整
    for d in D:
        dx,dy = x-x0,y-y0
        # 右
        if dy < dx and dy > -dx:
            ans += "R"
            x0 += d
        # 下
        elif dy < dx and dy < -dx:
            ans += "D"
            y0 -= d
        # 左
        elif dy > dx and dy < -dx:
            ans += "L"
            x0 -= d
        # 上
        else:
            ans += "U"
            y0 += d
    Ans.append(ans)

# パリティが 0 の場合 : 長さ1のアームを追加, X座標を -1 した分を +1 して調整(つまり最後に "R" を追加する)
if 0 in p:
    D.append(1)
    print((len(D)))
    print((" ".join(map(str,D))))
    for ans in Ans:
        print((ans + "R"))
# パリティが 1 の場合 : そのまま出力
else:
    print((len(D)))
    print((" ".join(map(str,D))))
    for ans in Ans:
        print(ans)





n = int(input())
xys = [list(map(int, input().split())) for _ in range(n)]

# 各クエリのパリティをチェックする
p = sum(xys[0]) % 2
for xy in xys:
    x, y = xy
    if (x + y) % 2 != p: # パリティが異なるクエリが存在するため、達成できない
        print(-1)
        return

if p == 0:
    d = [1]
else:
    d= []

d += [2 ** k for k in range(30 + 1)] # 2 ** 0 から 2 ** 30 まで
m = len(d)

ws = [['' for _ in range(m)] for _ in range(n)]
idx = 0
for xy in xys:
    x, y = xy
    for k in sorted(range(m), reverse=True):
        R = abs(x - d[k]) + abs(y)
        L = abs(x + d[k]) + abs(y)
        U = abs(x) + abs(y - d[k])
        D = abs(x) + abs(y + d[k])

        min_v = min(R, L, U, D)

        if min_v == R:
            ws[idx][k] = 'R'
            x -= d[k]
        elif min_v == L:
            ws[idx][k] = 'L'
            x += d[k]
        elif min_v == U:
            ws[idx][k] = 'U'
            y -= d[k]
        else:
            # if min_v == D:
            ws[idx][k] = 'D'
            y += d[k]
    idx += 1

print(m)
print(*d)
for w in ws:
    print(''.join(w))

import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**9)
n=int(input())
X,Y=[],[]
for _ in range(n):
    x,y=map(int,input().split())
    X.append(x)
    Y.append(y)
mod=(X[0]+Y[0])%2
for i in range(1,n):
    if (X[i]+Y[i])%2!=mod:
        print(-1)
        return
if not mod:
    X=[x+1 for x in X]
U=[X[i]+Y[i] for i in range(n)]
V=[X[i]-Y[i] for i in range(n)]
Mode=['L','D','U','R']
m=31
if mod:
    print(m)
    print(' '.join([str(2**i) for i in range(m)]))
else:
    print(m+1)
    print('1 '+' '.join([str(2**i) for i in range(m)]))
for i in range(n):
    w=''
    if not mod:
        w='L'
    ui=(U[i]+2**m-1)//2
    vi=(V[i]+2**m-1)//2
    for _ in range(m):
        u_bit,v_bit=ui&1,vi&1
        ui>>=1
        vi>>=1
        w+=Mode[u_bit*2+v_bit]
    print(w)

from math import *

def L(xi, di):
    return xi - di

def R(xi, di):
    return xi + di

def D(yi, di):
    return yi - di

def U(yi, di):
    return yi + di

def main():
    N = int(input())
    x_list = [list(map(int, input().split())) for i in range(N)]
    sum_list = [x[0] + x[1] for x in x_list]
    checker = sum_list[0] % 2

    for wa in sum_list:
        if wa % 2 != checker:
            print("-1")
            return

    arm_list = []
    if checker == 0:
        arm_list.append(1)

    pow_i = 0
    max_sum = max(sum_list)
    while max_sum > sum(arm_list):
        arm_list.insert(0, 2 ** pow_i)
        pow_i += 1
    print(len(arm_list))
    print(" ".join(map(str, arm_list)))

    for c in x_list:
        now_c = [0,0]
        order = ""

        for arm in arm_list:
            dx = c[0] - now_c[0]
            dy = c[1] - now_c[1]

            if abs(dx) > abs(dy):
                if dx > 0:
                    order += "R"
                    now_c[0] = R(now_c[0], arm)
                else:
                    order += "L"
                    now_c[0] = L(now_c[0], arm)
            else:
                if dy > 0:
                    order += "U"
                    now_c[1] = U(now_c[1], arm)
                else:
                    order += "D"
                    now_c[1] = D(now_c[1], arm)
        print(order)

def __starting_point():
    main()
__starting_point()

# できなかった
# アームの長さが決まると(xm+ym)mod2は一定になる、これが一定でなければ無理
# (xj+yj)mod2=1としてよい、長さ1の腕を追加することで0の場合も考えられる
# (u,v)=(x+y,x-y)(回転座標)とすると、ui,viをu(i+1),v(i+1)から独立に決定できる(+d,-dいづれかはされることが確定している)
# よってdiを決めたときにui,viを決める問題をu,vについて独立に解けば、各関節の向きを決定できる
# u(i+1)=ui+diとなるi∈{1,...,m}の集合をSとすると、u(m)=-Σ(1≦i≦m) di +Σ(i∈S) 2di が成り立つ
# -2*10^9≦Uj,Vj≦2*10^9 と 1≦m≦40 より m=31,di=2^(i-1) とできる。すると、Uj=-(2^31-1) +Σ(i∈S) 2di となる
# つまりΣ(i∈S) 2di =Uj+(2^31-1) となるようにSを選ぶことができるので解ける

n=int(input())
listXY=[list(map(int,input().split())) for _ in range(n)]
listUV=[[listXY[i][0]+listXY[i][1],listXY[i][0]-listXY[i][1]]for i in range(n)]

isOdd=listUV[0][0]%2
canReach=1
for i in range(1,n):
    if isOdd!=listUV[i][0]%2:
        canReach=0
        break

if not canReach:
    print((-1))
else:
    offset=2**31-isOdd
    m=32-isOdd
    d=[2**i for i in range(32)]
    w=[]
    for i in range(n):
        x,y=0,0
        u,v=listUV[i][0]+offset,listUV[i][1]+offset
        s=''
        if not isOdd:
            s='L'
            x=x-1
        for k in range(31):
            u //= 2
            v //= 2
            u1, v1 = u % 2, v % 2
            # L(-d,-d),R(+d,+d),D(-d,+d),U(+d,-d)
            if u1 == 0 and v1 == 1:
                s += 'D'
                y=y-d[k]
            elif u1 == 0 and v1 == 0:
                s += 'L'
                x=x-d[k]
            elif u1 == 1 and v1 == 1:
                s += 'R'
                x=x+d[k]
            elif u1 == 1 and v1 == 0:
                s += 'U'
                y=y+d[k]
        w.append(s)
        # print(x,y,s)
    # print(listXY)
    # print(listUV)
    print((32-isOdd))
    s=''
    if not isOdd:
        s='1 '
    for i in range(31):
        s+=str(d[i])+' '
    print(s)
    for i in range(n):
        print((w[i]))


N=int(input())
XY=[]
for i in range(N):
  XY.append(list(map(int,input().split())))
mr=abs(XY[0][0])+abs(XY[0][1])  
for i in range(1,N):
  if abs(XY[i][0])+abs(XY[i][1])>mr:
    mr=abs(XY[i][0])+abs(XY[i][1])
import math
m=int(math.log(mr,2)//1+1)
g=(XY[0][0]+XY[0][1])%2
cnt=0
for i in range(N):
  if (XY[i][0]+XY[i][1])%2==g:
    cnt+=1
if cnt!=N:
  print(-1)
else:
  if g==1:
    W=['']*N
    for i in range(N):
      for j in range(m):
        if abs(XY[i][0])>=abs(XY[i][1]) and XY[i][0]>=0:
          W[i]+='R'
          XY[i][0]-=2**(m-j-1)
        elif abs(XY[i][0])>=abs(XY[i][1]) and XY[i][0]<0:
          W[i]+='L'
          XY[i][0]+=2**(m-j-1)
        elif abs(XY[i][0])<abs(XY[i][1]) and XY[i][1]>=0:
          W[i]+='U'
          XY[i][1]-=2**(m-j-1)
        elif abs(XY[i][0])<abs(XY[i][1]) and XY[i][1]<0:
          W[i]+='D'
          XY[i][1]+=2**(m-j-1)
    print(m)
    for i in range(m):
       print(2**i,end=' ')
    print()
    for j in range(N):
      print(W[j][::-1])
  else:
    for i in range(N):
      XY[i][0]+=1
    W=['']*N
    for i in range(N):
      for j in range(m):
        if abs(XY[i][0])>=abs(XY[i][1]) and XY[i][0]>=0:
          W[i]+='R'
          XY[i][0]-=2**(m-j-1)
        elif abs(XY[i][0])>=abs(XY[i][1]) and XY[i][0]<0:
          W[i]+='L'
          XY[i][0]+=2**(m-j-1)
        elif abs(XY[i][0])<abs(XY[i][1]) and XY[i][1]>=0:
          W[i]+='U'
          XY[i][1]-=2**(m-j-1)
        elif abs(XY[i][0])<abs(XY[i][1]) and XY[i][1]<0:
          W[i]+='D'
          XY[i][1]+=2**(m-j-1)
    print(m+1)
    print(1,end=' ')
    for i in range(m):
      print(2**i,end=' ')
    print()
    for j in range(N):
      W[j]+='L'
      print(W[j][::-1])

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]


#合計が偶数or奇数のどちらかだけしかできない
if N != 1:
    a = abs(XY[0][0]) + abs(XY[0][1])
    flag = (XY[0][0] + XY[0][1])%2
for i in range(N-1):
    b = abs(XY[i+1][0]) + abs(XY[i+1][1])
    a = max(a, b)
    if flag != (XY[i+1][0] + XY[i+1][1])%2:
        print((-1))
        return

#必要な桁数の確認
m = 0
while a > 1:
    m += 1
    a = a//2

#腕の長さを求める
d = []
for i in range(m+3, -1, -1):
    d += [2 ** i]

if flag == 0: #偶数の場合一つずらすための1を加える
    print((len(d) + 1))
    print((' '.join(map(str, [1] + d))))
else: #奇数の場合そのまま出力
    print((len(d)))
    print((' '.join(map(str, d))))
#ここまでで、腕の長さが決定
#これ以降で各X, Yに対する答えを見つける。

def string(X, Y): #あるXYに対して動かし方を返す
    if (abs(X) + abs(Y))%2 == 0: #偶数のとき
        ans = 'R'
        x = X - 1
        y = Y
    else:
        x, y = X, Y
        ans = str()
    for i in d:
        if abs(x - i) + abs(y) < i:
            ans += 'R'
            x = x - i
        elif abs(x + i) + abs(y) < i:
            ans += 'L'
            x = x + i
        elif abs(x) + abs(y - i) < i:
            ans += 'U'
            y = y - i
        elif abs(x) + abs(y + i) < i:
            ans += 'D'
            y = y + i
    return ans

for i in XY:
    print((string(i[0], i[1])))
# print (string(XY[0][0], XY[0][1]))
# print (string(XY[1][0], XY[1][1]))
# print (string(XY[2][0], XY[2][1]))
# print (string(XY[3][0], XY[3][1]))


# 解説を参考に作成
# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
#
#
# @stop_watch
def solve(N, XY):
    tmp = 0
    for x, y in XY:
        tmp += (abs(x) + abs(y)) % 2
    if tmp % N != 0:
        print(-1)
        return
    import math
    m = math.ceil(math.log2(2 * 10 ** 9)) + 1
    d = [2 ** (m - i) for i in range(m)] + [1]
    d += [1] if tmp == 0 else []
    m = len(d)
    w = []
    for xi, yi in XY:
        xx = 0
        yy = 0
        W = ''
        for di in d:
            if abs(xi - xx) >= abs(yi - yy):
                if xx <= xi:
                    xx += di
                    W += 'R'
                else:
                    xx -= di
                    W += 'L'
            else:
                if yy <= yi:
                    yy += di
                    W += 'U'
                else:
                    yy -= di
                    W += 'D'
        w.append(W)
    print(m)
    print(' '.join([str(i) for i in d]))
    [print(wi) for wi in w]


def __starting_point():
    # S = input()
    N = int(input())
    # N, M = map(int, input().split())
    # A = [int(i) for i in input().split()]
    # B = [int(i) for i in input().split()]
    XY = [[int(i) for i in input().split()] for _ in range(N)]
    solve(N, XY)

    # # test
    # from random import randint
    # from func import random_str
    # solve()

__starting_point()

# -*- coding: utf-8 -*-
import math


def binary(n, m):
    lst = []
    while n != 0:
        lst.append(n % 2)
        n = n // 2
    lst = lst + [0] * (m - len(lst))
    return list(reversed(lst))


def calc(u, v, m):
    result = ""
    u_binary = binary(u, m)
    v_binary = binary(v, m)
    for i in range(m):
        if u_binary[i] == 1 and v_binary[i] == 1:
            result += "R"
        elif u_binary[i] == 0 and v_binary[i] == 0:
            result += "L"
        elif u_binary[i] == 1 and v_binary[i] == 0:
            result += "U"
        else:
            result += "D"
    return result


U = []
V = []
N = int(input())
even, odd = 0, 0
M = 0
for p in range(N):
    x, y = list(map(int, input().split()))
    u = x + y
    v = x - y
    U.append(u)
    V.append(v)
    M = max(M, abs(u), abs(v))
    if (x + y) % 2 == 0:
        even += 1
    else:
        odd += 1

if even >= 1 and odd >= 1:
    print((-1))

else:
    m = math.floor(math.log2(M)) + 1 if M != 0 else 1
    lst = [2 ** i for i in range(m-1, -1, -1)]
    if odd == 0:
        lst.append(1)
    print((len(lst)))
    print((" ".join(map(str, lst))))
    for u, v in zip(U, V):
        u = (u + 2 ** m - 1) // 2
        v = (v + 2 ** m - 1) // 2
        print((calc(u, v, m)+"R" if odd == 0 else calc(u, v, m)))


def main():
    """
    ロボットアーム

    腕、関節
        arm_1, arm_2,...,arm_m
    k_0,  k_1,   k_2,...,  k_m

    k_i-1, arm_i, k_i
    arm_i_length: d_i

    mode: L, R, D, U

        (x0, y0) = (0, 0)
        L: (x_i, y_i) = (x_i-1 - d_i, y_i-1)
        R: (x_i, y_i) = (x_i-1 + d_i, y_i-1)
        U: (x_i, y_i) = (x_i-1,       y_i-1 - d_i)
        D: (x_i, y_i) = (x_i-1,       y_i-1 + d_i)

    input:
            1 <= N  <= 10^3
        -10^9 <= Xi <= 10^9
        -10^9 <= Yi <= 10^9

    output:
        NG: -1
        OK:

        m
        d1 d2 ... dm
        w1
        w2
        ...
        wN

        1 <= m   <= 40
        1 <= d_i <= 10^12
        w_i: {L, R, U, D}, w_i_lenght = m

    動かし方の例は、入力例1参照
    """
    N = int(input())
    X, Y = zip(*(
        map(int, input().split())
        for _ in range(N)
    ))

    # m, d, w = part_300(N, X, Y)
    m, d, w = ref(N, X, Y)

    if m == -1:
        print(-1)
    else:
        print(m)
        print(*d)
        print(*w, sep="\n")


def ex1(N, X, Y):
    m = 2
    d = [1, 2]
    w = ["RL", "UU", "DR"]
    return m, d, w


def part_300(N, X, Y):
    """
    1つ1つのクエリに対する操作は独立
    ただし、使うパラメータm, d は共通

    部分点は以下の制約
       -10 <= i <= 10
       -10 <= i <= 10

    探索範囲
        20 * 20
        この範囲においてm<=40で到達するためのd
    d=1のとき|X|+|Y|の偶奇
        揃っている場合、mは最大に合わせる、余っているときはRLのように移動なしにできる
        揃っていない場合, d=1では不可能？
        2と1およびLR,UDを駆使して-1を再現して偶奇を揃える?
            無理っぽい: 奇数しか作れない
    """
    dists = []
    for x, y in zip(X, Y):
        dist = abs(x) + abs(y)
        dists.append(dist)

    m = -1
    d = []
    w = []
    mod = list(map(lambda x: x % 2, dists))
    if len(set(mod)) == 1:
        m = max(dists)
        d = [1] * m
        for x, y, dist in zip(X, Y, dists):
            x_dir = "R" if x > 0 else "L"
            y_dir = "U" if y > 0 else "D"

            _w = x_dir * abs(x) + y_dir * abs(y)
            rest = m - len(_w)
            if rest > 0:
                _w += "LR" * (rest // 2)
            w.append(_w)

    return m, d, w


def editorial(N, X, Y):
    """
    2冪の数の組合せにより、どの点にでも移動できるようになる
        ※ただし、奇数のみ。偶数に対応させたいときは１での移動を追加する

      1,   2,   4,   8,
    2^0, 2^1, 2^2, 2^3, ...

    {1} だけでの移動、原点からの1の距離。当たり前
    x: 原点
            b
    -------cxa------
            d

    {1, 2} での移動、原点から1の距離から2移動できる
    a-d を基準に考えると
        a-d をa方向に2移動: a方向に菱形の移動範囲が増える
        a-d をb方向に2移動: b
        a-d をc方向に2移動: c
        a-d をd方向に2移動: d
            b
           b b
          c b a
         c cxa a
          c d a
           d d
            d

    https://twitter.com/CuriousFairy315/status/1046073372315209728
    https://twitter.com/schwarzahl/status/1046031849221316608
    どうして(u, v)=(x+y, x-y)的な変換を施す必要があるのか？
        https://twitter.com/ILoveTw1tter/status/1046062363831660544
        http://drken1215.hatenablog.com/entry/2018/09/30/002900
             x 座標, y 座標両方頑張ろうと思うと、60 個くらい欲しくなる。で、困っていた。

         U
         |
    L----o----R
         |
         D

    # TODO
      U＼        ／R
         ＼    ／
           ＼／
           ／ ＼
         ／     ＼
      L／         ＼D
    """
    pass


def ref(N, X, Y):
    dists = []
    for x, y in zip(X, Y):
        dist = (abs(x) + abs(y)) % 2
        dists.append(dist)

    m = -1
    d = []
    w = []
    mod = set(map(lambda x: x % 2, dists))
    if len(mod) != 1:
        return m, d, w

    for i in range(30, 0-1, -1):
        d.append(1 << i)
    if 0 in mod:
        d.append(1)
    m = len(d)

    w1 = transform_xy(N, X, Y, d)
    # w2 = no_transform_xy(N, X, Y, d)
    # assert w1 == w2

    return m, d, w1


def transform_xy(N, X, Y, d):
    """
    http://kagamiz.hatenablog.com/entry/2014/12/21/213931
    """
    # 変換: θ=45°, 分母は共通の√2 なので払ってしまうと下記の式になる
    trans_x = []
    trans_y = []
    for x, y in zip(X, Y):
        trans_x.append(x + y)
        trans_y.append(x - y)

    plot = False
    if plot:
        import matplotlib.pyplot as plt

        plt.axhline(0, linestyle="--")
        plt.axvline(0, linestyle="--")

        # denominator: 分母
        deno = 2 ** 0.5
        plt.scatter(X, Y, label="src")
        plt.scatter([x / deno for x in trans_x],
                    [y / deno for y in trans_y],
                    label="trans")

        for x, y, x_src, y_src in zip(trans_x, trans_y, X, Y):
            plt.text(x_src, y_src, str((x_src, y_src)))
            plt.text(x / deno, y / deno, str((x_src, y_src)))

        plt.legend()
        plt.show()

    # print(*zip(X, Y))
    # print(*zip(trans_x, trans_y))

    w = []
    dirs = {
        # dir: x', y'
        (-1, -1): "L",  # 本来の座標(x, y): (-1,  0), 変換後: (-1+0, -1-0)
        (+1, +1): "R",  # 本来の座標(x, y): (+1,  0), 変換後: (+1+0, +1-0)
        # 感覚と違うのは、変換の仕方
        (+1, -1): "U",  # 本来の座標(x, y): ( 0, +1), 変換後: ( 0+1,  0-(-1))
        (-1, +1): "D",  # 本来の座標(x, y): ( 0, -1), 変換後: ( 0-1,  0-(+1))
    }
    for x, y in zip(trans_x, trans_y):
        x_sum = 0
        y_sum = 0
        _w = ""
        for _d in d:
            # 変換後の座標でx',y'を独立に求めている
            if x_sum <= x:
                x_dir = 1
                x_sum += _d
            else:
                x_dir = -1
                x_sum -= _d

            if y_sum <= y:
                y_dir = 1
                y_sum += _d
            else:
                y_dir = -1
                y_sum -= _d

            _w += dirs[(x_dir, y_dir)]

        w.append(_w)

    return w


def no_transform_xy(N, X, Y, d):
    w = []
    for x, y in zip(X, Y):
        x_sum, y_sum = 0, 0
        _w = ""
        for _d in d:
            # 変化量の大きい方を優先する
            if abs(x_sum - x) >= abs(y_sum - y):
                if x_sum >= x:
                    x_sum -= _d
                    _w += "L"
                else:
                    x_sum += _d
                    _w += "R"
            else:
                if y_sum >= y:
                    y_sum -= _d
                    _w += "D"
                else:
                    y_sum += _d
                    _w += "U"

        w.append(_w)

    return w


def __starting_point():
    main()

__starting_point()

N = int(input())
Points = [list(map(int, input().split())) for i in range(N)]

odd_or_even = set([(x + y) % 2 for x, y in Points])
if len(odd_or_even) == 2:
    print((-1))
    return


D = [2 ** i for i in range(39)]
D = D[::-1]
if 0 in odd_or_even:
    D.append(1)

print((len(D)))
print((' '.join(map(str, D))))
operation = {'R': (-1, 0), 'L': (1, 0), 'U': (0, -1), 'D': (0, 1)}  # 反対にすることに注意
for x, y in Points:
    nx, ny = x, y
    ans = ''
    for d in D:
        best_score = float('inf')
        best_command = None
        next_x, next_y = None, None

        for command, move in list(operation.items()):
            mx, my = move
            tx, ty = nx + d * mx, ny + d * my
            score = abs(tx) + abs(ty)
            if score < best_score:
                best_score = score
                best_command = command
                next_x, next_y = tx, ty

        ans += best_command
        nx, ny = next_x, next_y

    print(ans)


#!/usr/bin/env python3

def main():
    N = int(input())
    XY_list = []
    for i in range(N):
        XY_list.append(list(map(int, input().split())))

    rot_list = list([[xy[0] + xy[1], -xy[0] + xy[1]] for xy in XY_list])

    f = True
    p = rot_list[0][0] % 2
    for i in range(1, N):
        if rot_list[i][0] % 2 != p:
            f = False
            break

    if not f:
        print((-1))
    else:
        offset = 2 ** 31 - p
        m = 32 - p
        d = []
        if p == 0:
            d.append(1)
        for k in range(31):
            d.append(2 ** k)
        w = []
        for i in range(N):
            uv = rot_list[i]
            u, v = uv[0] + offset, uv[1] + offset
            s = ''
            if p == 0:
                s = 'D'
            for k in range(31):
                u //= 2
                v //= 2
                u1, v1 = u % 2, v % 2
                if u1 == 0 and v1 == 0:
                    s += 'D'
                elif u1 == 0 and v1 == 1:
                    s += 'L'
                elif u1 == 1 and v1 == 0:
                    s += 'R'
                elif u1 == 1 and v1 == 1:
                    s += 'U'
            w.append(s)

        print(m)
        s = ''
        for dv in d:
            s += ' ' + str(dv)
        print((s[1:]))
        for i in range(N):
            print((w[i]))


def __starting_point():
    main()


__starting_point()

import sys

N = int(input())
XY = [[int(_) for _ in input().split()] for i in range(N)]

mc = [0, 0]
maxl = 0

for x, y in XY:
    l = abs(x) + abs(y)
    maxl = max(maxl, l)
    mc[l % 2] += 1

if mc[0] > 0 and mc[1] > 0:
    print((-1))
    return

def calc(sx, sy, ex, ey, d):
    dx, dy = ex - sx, ey - sy
    if dx > dy:
        if dx > -dy:
            return "R", sx + d, sy
        else:
            return "D", sx, sy - d
    else:
        if dx > -dy:
            return "U", sx, sy + d
        else:
            return "L", sx - d, sy

import math

l = math.ceil(math.log(maxl + 1, 2))

ms = [1 << i for i in range(l)][::-1]

rms = ms

if mc[0] > 0:
    rms = [1] + ms

print((len(rms)))
print((*rms))

for ex, ey in XY:
    x, y = 0, 0
    w = ""
    if mc[0] > 0:
        w = "R"
        x += 1
    for m in ms:
        d, x, y = calc(x, y, ex, ey, m)
        w += d
    print(w)



N=int(input())
xy=[list(map(int,input().split())) for _ in range(N)]

def parity():
  res=sum(xy[0])%2
  for x,y in xy:
    if (x+y)%2!=res:
      return -1
  return res
 
p=parity()
if p==-1:
  print(-1)
  return

dd=[1]
if p==0:dd.append(1)
lim=10**12
while len(dd)<40 and dd[-1]*2<=lim:
    dd.append(dd[-1]*2)
print(40)
print(*dd)
 
for x,y in xy:
  ans=""
  for d in dd[::-1]:
    if abs(x)>abs(y):
      if x>0:
        x-=d
        ans+="R"
      else:
        x+=d
        ans+="L"
    else:
      if y>0:
        y-=d
        ans+="U"
      else:
        y+=d
        ans+="D"
  print(ans[::-1])

#19:32
n = int(input())
raw = []
eo = []
h = 30
for _ in range(n):
  x,y = map(int,input().split())
  raw.append([x,y])
  eo.append((x+y)%2)
if sum(eo) == 0:
  print(h+2)
  d = [2**(h-i) for i in range(h+1)]
  d.append(1)
  print(' '.join(map(str,d)))
elif sum(eo) == n:
  print(h+1)
  d = [2**(h-i) for i in range(h+1)]
  print(' '.join(map(str,d)))
else:
  print(-1)
  return
for xy in raw:
  x,y = xy
  scale = 2 ** h
  ans = ''
  while scale != 0:
    tmp = [[0,0,'U'],[0,1,'D'],[0,2,'R'],[0,3,'L']]
    tmp[0][0] =   x   ** 2 + (y-1) ** 2
    tmp[1][0] =   x   ** 2 + (y+1) ** 2
    tmp[2][0] = (x-1) ** 2 +   y   ** 2
    tmp[3][0] = (x+1) ** 2 +   y   ** 2
    d,dr = min(tmp)[1],min(tmp)[2]
    ans += dr
    if d == 0:
      y -= scale
    elif d == 1:
      y += scale
    elif d == 2:
      x -= scale
    else:
      x += scale
    scale //= 2
  if x+y != 0:
    if y == 1:
      ans += 'U'
    elif y == -1:
      ans += 'D'
    elif x == 1:
      ans += 'R'
    else:
      ans += 'L'
  print(ans)


def get_check(num, place):
    dist = abs(place[0][0]) + abs(place[0][1])
    check_flg = dist

    for i in range(num - 1):
        dist_now = abs(place[i + 1][0]) + abs(place[i + 1][1])
        if dist % 2 != dist_now % 2:
            check_flg = 0
            break
        if check_flg < dist_now:
            check_flg = dist_now
    return check_flg

def start_process(num, place):

    check_flg = get_check(num, place)
    if check_flg:

        seeds = [2 ** (31 - i) for i in range(32)]
        if check_flg % 2 == 0:
            seeds.append(1)
        print(len(seeds))
        print(' '.join(map(str, seeds)))

        for x, y in place:
            for k in seeds:
                if abs(x) > abs(y):
                    if x > 0:
                        res = 'R'
                        x -= k
                    else:
                        res = 'L'
                        x += k
                else:
                    if y > 0:
                        res = 'U'
                        y -= k
                    else:
                        res = 'D'
                        y += k
                print(res, end='')
            print('')


    else:
        print(-1)


def main():
    num = int(input())
    place = [list(map(int, input().split())) for i in range(num)]
    start_process(num, place)


def __starting_point():
    main()
__starting_point()

# -*- coding: utf-8 -*-
import math


def binary(n):
    lst = []
    while n != 0:
        lst.append(n % 2)
        n = n // 2
    lst = lst + [0] * (31 - len(lst))
    return list(reversed(lst))


def calc(u, v):
    result = ""
    u_binary = binary(u)
    v_binary = binary(v)
    for i in range(31):
        if u_binary[i] == 1 and v_binary[i] == 1:
            result += "R"
        elif u_binary[i] == 0 and v_binary[i] == 0:
            result += "L"
        elif u_binary[i] == 1 and v_binary[i] == 0:
            result += "U"
        else:
            result += "D"
    return result


U = []
V = []
N = int(input())
even, odd = 0, 0

for p in range(N):
    x, y = list(map(int, input().split()))
    U.append(x+y)
    V.append(x-y)
    if (x + y) % 2 == 0:
        even += 1
    else:
        odd += 1

if even >= 1 and odd >= 1:
    print((-1))

else:
    lst = [2 ** i for i in range(30, -1, -1)]
    if odd == 0:
        lst.append(1)
    print((len(lst)))
    print((" ".join(map(str, lst))))
    for u, v in zip(U, V):
        u = (u + 2 ** 31 - 1) // 2
        v = (v + 2 ** 31 - 1) // 2
        print((calc(u, v)+"R" if odd == 0 else calc(u, v)))


n = int(input())
p,d = [],[]
for _ in range(n):
	x,y = (int(i) for i in input().split())
	p.append((x,y))
a = sum(p[0])%2
def f(i,j):
	s,s2,ans = bin((i+j+2**31-1)//2)[::-1][:-2],bin((i-j+2**31-1)//2)[::-1][:-2],""
	s,s2 = s+(31-len(s))*"0",s2+(31-len(s2))*"0"
	for i in range(31):
		if s[i]==s2[i]=="0": ans+="L"
		elif s[i]==s2[i]=="1": ans+="R"
		elif int(s[i]): ans+="U"
		else: ans+="D"
	return ans
if any(a!=sum(p[i])%2 for i in range(n)): print(-1)
else:
	if a-1: d.append("1")
	print(32-a)
	for i in range(31): d.append(str(2**i))
	print(" ".join(d))
	if a:
		for i,j in p: print(f(i,j))
	else:
		for i,j in p: print("R"+f(i-1,j))

import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def parity():
    res=sum(xy[0])%2
    for x,y in xy:
        if (x+y)%2!=res:return -1
    return res

n=II()
xy=LLI(n)

p=parity()
if p==-1:
    print(-1)
    return

dd=[1]
if p==0:dd.append(1)
lim=10**12
while len(dd)<40 and dd[-1]*2<=lim:
    dd.append(dd[-1]*2)
print(40)
print(*dd)

for x,y in xy:
    ans=""
    for d in dd[::-1]:
        if abs(x)>abs(y):
            if x>0:
                x-=d
                ans+="R"
            else:
                x+=d
                ans+="L"
        else:
            if y>0:
                y-=d
                ans+="U"
            else:
                y+=d
                ans+="D"
    print(ans[::-1])


N = int(input())
S = [0] * N
X = [0] * N
Y = [0] * N
for i in range(N):
    X[i], Y[i] = map(int, input().split())
    S[i] = X[i] + Y[i]
    #偶奇が一致しているか
    if (S[i] - S[0]) % 2 != 0:
        print(-1)
        return

nums = []
for i in range(30, -1, -1):
    #2の冪乗を生成
    nums.append(1 << i)

#偶数で一致している時、1を加えて偶数間を移動できるようにする
if S[0] % 2 == 0:
    nums.append(1)

m = len(nums)

print(m)
print(*nums)

for i in range(N):
    u = X[i] + Y[i]
    v = X[i] - Y[i]
    #貪欲に足し引きをしていくとu, vへの移動が完了する
    for num in nums:
        if u >= 0:
            if v >= 0:
                print('R',end='')
                u -= num
                v -= num
            else:
                print('U',end='')
                u -= num
                v += num
        else:
            if v >= 0:
                print('D',end='')
                u += num
                v -= num
            else:
                print('L',end='')
                u += num
                v += num
    print()

print()


from functools import reduce
import math

n = int(input())
coord = [tuple(map(int, input().split())) for i in range(n)]

# parity check and get max
x, y = coord[0]
p = (x + y) & 1
limit = 0
for x, y in coord:
    if p != (x + y) & 1:
        print(-1)
        return
    lim = abs(x) + abs(y)
    if lim > limit:
        limit = lim

limit = round(math.log2(limit))
if p == 1:
    d = [2 ** i for i in reversed(range(limit + 1))]
else:
    d = [1] + [2 ** i for i in reversed(range(limit + 1))]

print(len(d))
print(reduce((lambda acc, dist: str(acc) + " " + str(dist)), d))

for x, y in coord:
    u = x + y
    v = x - y

    command = ""
    for i in range(len(d)):
        if u >= 0 and v >= 0:
            command += "R"
            u -= d[i]
            v -= d[i]
        elif u >= 0 > v:
            command += "U"
            u -= d[i]
            v += d[i]
        elif u < 0 <= v:
            command += "D"
            u += d[i]
            v -= d[i]
        elif u < 0 and v < 0:
            command += "L"
            u += d[i]
            v += d[i]

    print(command)

n = int(input())

P = []
M = []
for _ in range(n):
  x, y = map(int, input().split())
  P.append((x, y))
  M.append((x + y) % 2)

if len(set(M)) == 2:
  print(-1)
  return

D = [1 << i for i in range(31, -1, -1)]
if M[0] == 0:
  D.append(1)

print(len(D))
print(*D, sep=' ')

for x, y in P:
  a = []
  for d in D:
    if abs(x) > abs(y):
      if x < 0:
        a.append('L')
        x += d
      else:
        a.append('R')
        x -= d
    else:
      if y < 0:
        a.append('D')
        y += d
      else:
        a.append('U')
        y -= d
  print(*a, sep='')

def main():
    """
    ロボットアーム

    腕、関節
        arm_1, arm_2,...,arm_m
    k_0,  k_1,   k_2,...,  k_m

    k_i-1, arm_i, k_i
    arm_i_length: d_i

    mode: L, R, D, U

        (x0, y0) = (0, 0)
        L: (x_i, y_i) = (x_i-1 - d_i, y_i-1)
        R: (x_i, y_i) = (x_i-1 + d_i, y_i-1)
        U: (x_i, y_i) = (x_i-1,       y_i-1 - d_i)
        D: (x_i, y_i) = (x_i-1,       y_i-1 + d_i)

    input:
            1 <= N  <= 10^3
        -10^9 <= Xi <= 10^9
        -10^9 <= Yi <= 10^9

    output:
        NG: -1
        OK:

        m
        d1 d2 ... dm
        w1
        w2
        ...
        wN

        1 <= m   <= 40
        1 <= d_i <= 10^12
        w_i: {L, R, U, D}, w_i_lenght = m

    動かし方の例は、入力例1参照
    """
    N = int(input())
    X, Y = zip(*(
        map(int, input().split())
        for _ in range(N)
    ))

    # m, d, w = part_300(N, X, Y)
    m, d, w = ref(N, X, Y)

    if m == -1:
        print(-1)
    else:
        print(m)
        print(*d)
        print(*w, sep="\n")


def ex1(N, X, Y):
    m = 2
    d = [1, 2]
    w = ["RL", "UU", "DR"]
    return m, d, w


def part_300(N, X, Y):
    """
    1つ1つのクエリに対する操作は独立
    ただし、使うパラメータm, d は共通

    部分点は以下の制約
       -10 <= i <= 10
       -10 <= i <= 10

    探索範囲
        20 * 20
        この範囲においてm<=40で到達するためのd
    d=1のとき|X|+|Y|の偶奇
        揃っている場合、mは最大に合わせる、余っているときはRLのように移動なしにできる
        揃っていない場合, d=1では不可能？
        2と1およびLR,UDを駆使して-1を再現して偶奇を揃える?
            無理っぽい: 奇数しか作れない
    """
    dists = []
    for x, y in zip(X, Y):
        dist = abs(x) + abs(y)
        dists.append(dist)

    m = -1
    d = []
    w = []
    mod = list(map(lambda x: x % 2, dists))
    if len(set(mod)) == 1:
        m = max(dists)
        d = [1] * m
        for x, y, dist in zip(X, Y, dists):
            x_dir = "R" if x > 0 else "L"
            y_dir = "U" if y > 0 else "D"

            _w = x_dir * abs(x) + y_dir * abs(y)
            rest = m - len(_w)
            if rest > 0:
                _w += "LR" * (rest // 2)
            w.append(_w)

    return m, d, w


def editorial(N, X, Y):
    """
    2冪の数の組合せにより、どの点にでも移動できるようになる
        ※ただし、奇数のみ。偶数に対応させたいときは１での移動を追加する

      1,   2,   4,   8,
    2^0, 2^1, 2^2, 2^3, ...

    {1} だけでの移動、原点からの1の距離。当たり前
    x: 原点
            b
    -------cxa------
            d

    {1, 2} での移動、原点から1の距離から2移動できる
    a-d を基準に考えると
        a-d をa方向に2移動: a方向に菱形の移動範囲が増える
        a-d をb方向に2移動: b
        a-d をc方向に2移動: c
        a-d をd方向に2移動: d
            b
           b b
          c b a
         c cxa a
          c d a
           d d
            d

    https://twitter.com/CuriousFairy315/status/1046073372315209728
    https://twitter.com/schwarzahl/status/1046031849221316608
    どうして(u, v)=(x+y, x-y)的な変換を施す必要があるのか？
        https://twitter.com/ILoveTw1tter/status/1046062363831660544
        http://drken1215.hatenablog.com/entry/2018/09/30/002900
             x 座標, y 座標両方頑張ろうと思うと、60 個くらい欲しくなる。で、困っていた。


         U
         |
    L----o----R
         |
         D

      U＼        ／R
         ＼    ／
           ＼／
           ／ ＼
         ／     ＼
      L／         ＼D
    """
    pass


def ref(N, X, Y):
    dists = []
    for x, y in zip(X, Y):
        dist = (abs(x) + abs(y)) % 2
        dists.append(dist)

    m = -1
    d = []
    w = []
    mod = set(map(lambda x: x % 2, dists))
    if len(mod) != 1:
        return m, d, w

    for i in range(30, 0-1, -1):
        d.append(1 << i)
    if 0 in mod:
        d.append(1)
    m = len(d)

    # w = transform_xy(N, X, Y, d)
    w = no_transform_xy(N, X, Y, d)
    # print(w)

    return m, d, w


def transform_xy(N, X, Y, d):
    w = []
    dirs = {
        # dir: x', y'
        (-1, -1): "L",  # 本来の座標(x, y): (-1,  0)
        (+1, +1): "R",  # 本来の座標(x, y): (+1,  0)
        (+1, -1): "U",  # 本来の座標(x, y): ( 0, +1)
        (-1, +1): "D",  # 本来の座標(x, y): ( 0, -1)
    }
    for x, y in zip(X, Y):
        x_sum = 0
        y_sum = 0
        _w = ""
        for _d in d:
            # 変換後の座標でx',y'を独立に求めている?
            if x_sum <= x:
                x_dir = 1
                x_sum += _d
            else:
                x_dir = -1
                x_sum -= _d

            if y_sum <= y:
                y_dir = 1
                y_sum += _d
            else:
                y_dir = -1
                y_sum -= _d

            _w += dirs[(x_dir, y_dir)]

        w.append(_w)

    return w


def no_transform_xy(N, X, Y, d):
    w = []
    for xt, yt in zip(X, Y):
        x, y = 0, 0
        _w = ""
        for _d in d:
            if abs(x - xt) >= abs(y - yt):
                if x >= xt:
                    x -= _d
                    _w += "L"
                else:
                    x += _d
                    _w += "R"
            else:
                if y >= yt:
                    y -= _d
                    _w += "D"
                else:
                    y += _d
                    _w += "U"

        w.append(_w)

    return w


def __starting_point():
    main()

__starting_point()

n=int(input())
xy=[list(map(int,input().split())) for _ in range(n)]
m=39
ans=[]
if sum(xy[0])%2==0:ans.append(1)
for i in range(m):
    ans.append(2**i)
c=sum(xy[0])%2
for x,y in xy:
    if (x+y)%2!=c:print(-1);return()
print(len(ans))
print(*ans[::-1])
def chk(s):
    a=[]
    for d in ans[::-1]:
        if abs(s-d)<abs(s+d):
            a.append(-1)
            s-=d
        else:
            a.append(1)
            s+=d
    return a
xpy,xmy=[],[]
for x,y in xy:
    xpy=chk(x+y)
    xmy=chk(x-y)
    s=[]
    for p,m in zip(xpy,xmy):
        if p==1 and m==1:s.append('L')
        if p==-1 and m==-1:s.append('R')
        if p==1 and m==-1:s.append('D')
        if p==-1 and m==1:s.append('U')
    print(*s,sep='')

import sys

N = int(input())
XY = [[int(_) for _ in input().split()] for i in range(N)]

mc = [0, 0]
maxl = 0

for x, y in XY:
    l = abs(x) + abs(y)
    maxl = max(maxl, l)
    mc[l % 2] += 1

if mc[0] > 0 and mc[1] > 0:
    print((-1))
    return

#print(maxl)

def calc(sx, sy, ex, ey, d):
    dx, dy = ex - sx, ey - sy
    rx, ry = dx - dy, dx + dy
    if rx > 0:
        if ry > 0:
            d, x, y = "R", sx + d, sy
        else:
            d, x, y = "D", sx, sy - d
    else:
        if ry > 0:
            d, x, y = "U", sx, sy + d
        else:
            d, x, y = "L", sx - d, sy
    return d, x, y

import math

l = math.ceil(math.log(maxl + 1, 2))

ms = [2 ** (l - i - 1) for i in range(l)]

rms = ms

if mc[0] > 0:
    rms = [1] + ms

print((len(rms)))
print((*rms))

for ex, ey in XY:
    x, y = 0, 0
    w = ""
    if mc[0] > 0:
        w = "R"
        x += 1
    for m in ms:
        d, x, y = calc(x, y, ex, ey, m)
        w += d
    print(w)



###############################################################################

from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy

def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    nonlocal mod
    return (x + y) % mod


def modmlt(x, y):
    nonlocal mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in list(distance_list.items()):
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


###############################################################################


def main():
    n = intin()
    xylist = intinl(n)

    even_odd = None
    uvlist = []

    for x, y in xylist:
        tmp_even_odd = (x + y) % 2

        if even_odd is None:
            even_odd = tmp_even_odd

        if even_odd != tmp_even_odd:
            print((-1))
            return

        uvlist.append((x + y, x - y))

    m = 33 if even_odd else 34

    print(m)
    dlist = [str(2**i) for i in reversed(list(range(0, 33)))]
    if not even_odd:
        dlist.append('1')
    print((' '.join(dlist)))

    for u, v in uvlist:

        if not even_odd:
            u += 1
            v += 1
        line = ''

        if u >= 0 and v >= 0:
            line += 'R'
        if u >= 0 and v < 0:
            line += 'U'
        if u < 0 and v >= 0:
            line += 'D'
        if u < 0 and v < 0:
            line += 'L'

        for i in reversed(list(range(1, 33))):
            u_bit = (u >> i) & 1
            v_bit = (v >> i) & 1
            if u_bit and v_bit:
                line += 'R'
            if u_bit and not v_bit:
                line += 'U'
            if not u_bit and v_bit:
                line += 'D'
            if not u_bit and not v_bit:
                line += 'L'

        if not even_odd:
            line += 'L'

        print(line)


def __starting_point():
    main()

__starting_point()

N = int(input())
Point = [list(map(int, input().split())) for i in range(N)]


# 各点の原点からのマンハッタン距離の偶奇は一致していなければならない
if len(set([(abs(x) + abs(y)) % 2 for x, y in Point])) == 2:
    print((-1))
    return


# 2べきの腕を構成
Arms = [2 ** i for i in reversed(list(range(39)))]

# 偶数に合わせたい場合は長さ1の腕を追加
if (abs(Point[0][0]) + abs(Point[0][1])) % 2 == 0:
    Arms.append(1)


# Arm部の答えを出力
print((len(Arms)))
print((' '.join(map(str, Arms))))


# 各点に到達するための腕の決める
for x, y in Point:
    ans = ''
    for length in Arms:
        min_diff, tmp_s = float('inf'), ''
        next_x, next_y = None, None
        for order, dx, dy in (('L', 1, 0), ('R', -1, 0), ('D', 0, 1), ('U', 0, -1)):
            tmp_x, tmp_y = (x + length * dx), (y + length * dy)
            diff = abs(tmp_x) + abs(tmp_y)

            if diff < min_diff:
                min_diff = diff
                tmp_s = order
                next_x, next_y = tmp_x, tmp_y

        ans += tmp_s
        x, y = next_x, next_y
    print(ans)


import sys

n = int(sys.stdin.readline().rstrip())
xy = list(zip(*[map(int, sys.stdin.read().split())] * 2))

mask = (1 << 31) - 1
def solve(x, y, mode):
    u = x + y
    v = x - y
    if mode == 0:
        u -= 1
        v -= 1

    s = (u + mask) >> 1
    t = (v + mask) >> 1

    l = (~(s | t)) & mask
    r = s & t & mask
    d = (~s) & t & mask
    u = s & (~t) & mask

    res = ''
    for i in range(31):
        if l >> i & 1:
            res += 'L'
        elif r >> i & 1:
            res += 'R'
        elif d >> i & 1:
            res += 'D'
        elif u >> i & 1:
            res += 'U'
    if mode == 0:
        res += 'R'
    
    return [res]

def main():
    oe = (xy[0][0] + xy[0][1]) % 2
    for x, y in xy:
        if (x + y) % 2 != oe:
            print(-1)
            return

    m = 31
    d = [2 ** i for i in range(31)]
    if oe == 0:
        d += [1]
        m += 1
    yield [m]
    yield d

    for x, y in xy:
        yield solve(x, y, oe)

def __starting_point():
    ans = main()
    for i in ans:
        print(*i, sep=' ')
__starting_point()

import copy
N = int(input())
X = []
X.append(list(map(int, input().split())))
#Y = []
T = (X[0][0] + X[0][1]) % 2
max = abs(X[0][0]) + abs(X[0][1])
for i in range(1,N):
  X.append(list(map(int, input().split())))
  t = abs(X[i][0]) + abs(X[i][1])
  if t % 2 != T:
    print(-1)
    return
  if max < t:
    max = t
    
# 奇数: D =    1, 2, 4, 8...
# 偶数: D = 1, 1, 2, 4, 8...
# sum(D) > max
D = []
sum = 0
if T == 0:
  max -= 1
t = 1
while 1:
  D.append(t)
  sum += t
  if sum >= max:
    break
  t *= 2
if T == 0:
  D.append(1)
D.reverse()

# m
print(len(D))
# d1, d2, ... dm
s = ""
for i in range(len(D)):
  s += str(D[i]) + " "
print (s)

# w1, w2, ... wm
for i in range(N):
  U = X[i][0] + X[i][1]
  V = X[i][0] - X[i][1]
  s = ""
  for j in range(len(D)):
    if U >= 0:
      if V >= 0:
        s += "R"
        U -= D[j]
        V -= D[j]
      else:
        s += "U"
        U -= D[j]
        V += D[j]
    else:
      if V >= 0:
        s += "D"
        U += D[j]
        V -= D[j]
      else:
        s += "L"
        U += D[j]
        V += D[j]
  print(s)

def solve(x, y, d, m):
    ret = ""
    dx = [-1, 0, 0, 1]
    dy = [0, -1, 1, 0]
    mode = ['R', 'U', 'D', 'L']
    for i in range(m):
        dir = 0
        t = abs(x + d[i] * dx[0]) + abs(y + d[i] * dy[0])
        for j in range(4):
            nx = x + d[i] * dx[j]
            ny = y + d[i] * dy[j]
            if abs(nx) + abs(ny) < t:
                t = abs(nx) + abs(ny)
                dir = j
        x = x + d[i] * dx[dir]
        y = y + d[i] * dy[dir]
        ret += mode[dir]

    print (ret)


def main():
    m = 34
    X, Y, d = [], [], []

    for i in range(32, 0, -1):
        d += [2**i]
    d += [1]

    N = int(input())
    even, odd = 0, 0

    for i in range(N):
        x, y = map(int, input().split())
        X += [x]; Y += [y]

        if (abs(x) + abs(y)) % 2 == 0:
            even += 1
        else:
            odd += 1

    if even and odd:
        print(-1)
        return 0

    if odd:
        m -= 1
    else:
        d += [1]

    print(m)
    print(" ".join(map(str, d)))

    for i in range(N):
        solve(X[i], Y[i], d, m)

main()

import numpy as np

N = int(input())
XY = np.array([[int(x) for x in input().split()] for _ in range(N)],dtype=np.int64)
X = XY[:,0]
Y = XY[:,1]

command = np.array([''] * N,dtype=object)

def solve(k,X,Y,arms,command):  
  # |X|+|Y| <= 2^{k+1} のときに、2^kを使って
  # |X|+|Y| <= 2^kに書き直す
  if k == -1:
    return solve_final(X,Y,arms,command)
  # 絶対値が大きい方を操作
  bl_X = (np.abs(X) > np.abs(Y))
  bl_Y = ~bl_X
  negative_X = (X < 0)
  negative_Y = (Y < 0)
  L = bl_X & negative_X
  R = bl_X & (~negative_X)
  D = bl_Y & negative_Y
  U = bl_Y & (~negative_Y)
  command[L] += 'L'
  command[R] += 'R'
  command[D] += 'D'
  command[U] += 'U'
  p = (1<<k)
  arms.append(p)
  X[L] += p
  X[R] -= p
  Y[D] += p
  Y[U] -= p
  return solve(k-1,X,Y,arms,command)

def solve_final(X,Y,arms,command):
  s = np.abs(X) + np.abs(Y)
  bl0 = (s == 0).all()
  bl1 = (s == 1).all()
  if bl0:
    return arms,command
  elif not bl1:
    return None,None
  # |X| + |Y| = 1が保証されている
  arms.append(1)
  L = (X == -1)
  R = (X == 1)
  D = (Y == -1)
  U = (Y == 1)
  command[L] += 'L'
  command[R] += 'R'
  command[D] += 'D'
  command[U] += 'U'
  return arms,command

arms,command = solve(35,X,Y,[],command)

if arms is None:
  print(-1)
else:
  print(len(arms))
  print(' '.join([str(x) for x in arms]))
  print('\n'.join(command))

N = int(input())
point = [tuple(map(int, input().split())) for i in range(N)]
point_farthest = max(point, key=lambda p: abs(p[0]) + abs(p[1]))
mod = sum(point_farthest) % 2
D = [1, 1] if mod == 0 else [1]
while sum(D) < abs(point_farthest[0]) + abs(point_farthest[1]):
    D.append(D[-1] * 2)
D.reverse()
W = []
for x, y in point:
    if (x + y) % 2 != mod:
        print(-1)
        return
    w = ''
    for d in D:
        if abs(x) >= abs(y):
            if x > 0:
                w += 'R'
                x -= d
            else:
                w += 'L'
                x += d
        else:
            if y > 0:
                w += 'U'
                y -= d
            else:
                w += 'D'
                y += d
    W.append(w)
print(len(D))
print(*D)
print(*W, sep='\n')

def d_robot_arms(N, Pos):
    # 参考: http://drken1215.hatenablog.com/entry/2018/09/30/002900

    pos = []
    # すべての座標でパリティが一致しなければ、条件を満たす腕を選べない
    parity = (abs(Pos[0][0]) + abs(Pos[0][1])) % 2
    for x, y in Pos:
        parity_current = (abs(x) + abs(y)) % 2
        if parity != parity_current:
            return -1
        pos.append((x - y, x + y))
        # u=x-y, v=x+y とすると、 点(u, v)は
        # 原点周りに45度回転させて距離√2倍にする座標変換で点(x, y)から移される点
        # あるいはu軸, v軸はx軸, y軸をそれぞれ原点周りに-45度回転させた軸

    # log2(10**9)=29.90 なので、2**30以下の2の冪乗を適当に選べば
    # xy平面上の x+y が奇数である任意の座標に到達できる
    arms = [1 << k for k in range(30, -1, -1)]
    if parity % 2 == 0:
        arms.append(1)  # x+yが偶数である座標に到達するときに必要

    # 腕の数, 長さのリストを最初に格納する(任意の入力に対して固定)
    ans_tmp = [str(len(arms)), ' '.join(list(map(str, arms)))]

    for u_pos, v_pos in pos:
        # u, v座標はそれぞれ独立に見て構わない
        u_sum, v_sum = 0, 0
        tmp = ''
        for arm_len in arms:
            u_dir = 1 if u_sum <= u_pos else -1
            u_sum += u_dir * arm_len

            v_dir = 1 if v_sum <= v_pos else -1
            v_sum += v_dir * arm_len

            # uv平面で軸と平行にどちら向きに移動するかと
            # xy平面での移動モード(UDLR)との対応
            if u_dir == 1 and v_dir == 1:
                tmp += 'R'
            elif u_dir == 1 and v_dir == -1:
                tmp += 'D'
            elif u_dir == -1 and v_dir == -1:
                tmp += 'L'
            else:
                tmp += 'U'
        ans_tmp.append(''.join(tmp))
    ans = '\n'.join(ans_tmp)
    return ans

N = int(input())
Pos = [[int(i) for i in input().split()] for j in range(N)]
print(d_robot_arms(N, Pos))

N = int(input())
Q = [list(map(int, input().split())) for i in range(N)]

# 全体の偶奇が一致しているか
tmp = set()
for X, Y in Q:
    tmp.add((X + Y) % 2)
if len(tmp) != 1:
    print((-1))
    return

# 2べきの腕を用意
D = [2 ** i for i in range(30, -1, -1)]

# 偶数なら長さ1の腕を一本追加しておく
if 0 in tmp:
    D.append(1)

# 答えを作る
print((len(D)))
print((" ".join(map(str, D))))

move = [(1, 0, "R"), (-1, 0, "L"), (0, 1, "U"), (0, -1, "D")]
for X, Y in Q:
    nx, ny = 0, 0
    ans = ""
    for d in D:
        tmp_move_ans = ""
        tmp_move = None
        min_move_cost = float('inf')
        for mx, my, s in move:
            cost = abs(nx + mx * d - X) + abs(ny + my * d - Y)
            if cost < min_move_cost:
                tmp_move_ans = s
                min_move_cost = cost
                tmp_move_x = mx
                tmp_move_y = my

        ans += tmp_move_ans
        nx, ny = nx + tmp_move_x * d, ny + tmp_move_y * d
    print(ans)


n,*t=map(int,open(0).read().split())
*z,=zip(t[::2],t[1::2])
s=set((a+b)%2for a,b in z)
if len(s)>1:
    print(-1)
    return
s,*_=s
d=[2**(38-i)for i in range(39)]+[1]*(s<1)
print(len(d))
print(*d)
for a,b in z:
    x=y=0
    for i in d:
        if abs(a-x)>abs(b-y):
            if a-x>0:
                print('R',end='')
                x+=i
            else:
                print('L',end='')
                x-=i
        else:
            if b-y>0:
                print('U',end='')
                y+=i
            else:
                print('D',end='')
                y-=i
    print()

N = int(input())
X, Y = [], []
even, odd = 0, 0
for i in range(N):
    x, y = list(map(int, input().split()))
    X.append(x)
    Y.append(y)
    if (x + y) % 2 == 0:
        even += 1
    else:
        odd += 1


def calc(x, y):
    nowx, nowy = 0, 0
    t = ""
    for i in range(30, -1, -1):
        if nowx < x:
            nowx += 2 ** i
            p = 1
        else:
            nowx -= 2 ** i
            p = -1

        if nowy < y:
            nowy += 2 ** i
            q = 1
        else:
            nowy -= 2 ** i
            q = -1

        if p == 1 and q == 1:
            t += "R"
        elif p == 1 and q == -1:
            t += "U"
        elif p == -1 and q == 1:
            t += "D"
        else:
            t += "L"

    return t


if even >= 1 and odd >= 1:
    print((-1))
    return

else:
    d = [2 ** i for i in range(30, -1, -1)]
    if even == 0:
        print((31))
        print((" ".join(map(str, d))))
        for i in range(N):
            print((calc(X[i] + Y[i], X[i] - Y[i])))

    else:
        print((32))
        d.append(1)
        print((" ".join(map(str, d))))
        for i in range(N):
            print((calc(X[i] + Y[i] - 1, X[i] - Y[i] - 1) + "R"))




import sys, math, collections, heapq, itertools
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0: a, b = b, a % b
    return b
  
def solve():
    file = sys.stdin.readline #single: int(file()), line: map(int, file().split())
    N = int(file())
    point = [[int(i) for i in file().split()] for j in range(N)]
    length = (point[0][0] + point[0][1]) % 2
    for i in range(1, N):
        if sum(point[i]) % 2 != length:
            print(-1)
            break
    else:
        d = [pow(2, i) for i in range(31)]
        direction = {("0", "0"): "L", ("1","1"): "R", ("0", "1"): "D", ("1", "0"): "U"}
        ans = ""
        add = (0 if length == 1 else 1)
        if add == 1: d.append(1)
        for i in range(N):
            U, V = point[i][0] + point[i][1] + add, point[i][0] - point[i][1] + add
            ubit = format((U + pow(2, 31) - 1)//2, "b").zfill(31)
            vbit = format((V + pow(2, 31) - 1)//2, "b").zfill(31)
            arm = ""
            for j in reversed(range(31)):
                arm += direction[(ubit[j], vbit[j])]
            if add == 1: arm += "L"
            ans += arm + "\n"
        print(len(d))
        print(" ".join(map(str, d)))
        print(ans)

    INF = 10 ** 25
    mod = 7 + 10 ** 9
    return 0
  
def __starting_point():
    solve()
__starting_point()

inf = float('inf')

n = int(input())
coordinates = [tuple(map(int, input().split())) for _ in range(n)]

parity = None
can_make = True
for coordinate in coordinates:
    if parity is None:
        parity = sum(coordinate) % 2
    else:
        if parity != sum(coordinate) % 2:
            can_make = False
            break

if not can_make:
    print(-1)
    return
    # 到達可能な頂点はxy座標の和のパリティが一致している必要がある

m = 40
if parity == 0:
    d = [pow(2, i) for i in range(39)] + [1]
    # 奇数は1だけなので、1を追加して、全ての腕の合計が偶数になるようにする
else:
    d = [pow(2, i) for i in range(40)]
    # 奇数は1だけなので、全ての腕の合計は奇数になる
d.sort(reverse=True)

ans = []
for x, y in coordinates:
    curx, cury = 0, 0
    ops = ''
    for dd in d:
        dist = inf
        op = ''
        det_dx, det_dy = 0, 0
        for c, (dx, dy) in zip('LRDU', [(-1, 0), (1, 0), (0, -1), (0, 1)]):
            t = abs(curx + dx * dd - x) + abs(cury + dy * dd - y)
            if dist > t:
                op = c
                dist = t
                det_dx = dx
                det_dy = dy
        ops += op
        curx += det_dx * dd
        cury += det_dy * dd
    if (curx, cury) == (x, y):
        ans.append(ops)
    else:
        print(-1)
        # print('不一致', curx, cury, x, y)

print(m)
print(*d)
print(*ans, sep='\n')


N=int(input())
p=[[int(i) for i in input().split()] for i in range(N)]
p_copy=list(p)
p_copy.sort(key=lambda x:x[0]+x[1])
length=abs(p_copy[N-1][0])+abs(p_copy[N-1][1])
if length%2==0:
  edge=[1]
  a=1
  while a<length:
    edge.append(a)
    a=2*a
  edge.reverse()
else:
  edge=[]
  a=1
  while a<length:
    edge.append(a)
    a=2*a
  edge.reverse()
if len(edge)>40 or edge[len(edge)-1]>10**12:
  print((-1))
  return
w=[""]*N
for n in range(N):
  x,y=p[n][0],p[n][1]
  if (x+y)%2!=length%2:
    print((-1))
    return
  else:
    a,b=0,0
    for e in edge:
      R=abs(x-(a+e))+abs(y-(b))
      L=abs(x-(a-e))+abs(y-(b))
      U=abs(x-(a))+abs(y-(b+e))
      D=abs(x-(a))+abs(y-(b-e))
      if min([R,L,U,D])==R:
        a+=e
        w[n]+="R"
      elif min([R,L,U,D])==L:
        a+=-e
        w[n]+="L"
      elif min([R,L,U,D])==U:
        b+=e
        w[n]+="U"
      else:
        b+=-e
        w[n]+="D"
  
print((len(edge)))
map_edge=list(map(str,edge))
print((" ".join(map_edge)))
for n in range(N):
  print((w[n]))
    


N, *XY = map(int, open(0).read().split())
XY = list(zip(*[iter(XY)] * 2))

S = set((x + y) % 2 for x, y in XY)
if len(S) == 2:
    print(-1)
    return
mod = S.pop()

D = [2 ** i for i in reversed(range(32))] + [1] * (mod == 0)
print(len(D))
print(*D)

for x, y in XY:
    A = []
    for d in D:
        if 0 <= x - y and 0 <= x + y:
            A.append("R")
            x -= d
        elif x - y < 0 and 0 <= x + y:
            A.append("U")
            y -= d
        elif 0 <= x - y and x + y < 0:
            A.append("D")
            y += d
        else:
            A.append("L")
            x += d

    print("".join(A))

N = int(input())
XY = []
for _ in range(N):
    x, y = list(map(int, input().split()))
    XY.append((x + y, x - y))
if any(XY[0][0] % 2 != xy[0] % 2 for xy in XY):
    print((-1))
    return
odd = XY[0][0] % 2 == 1
if odd:
    d = [2 ** i for i in range(30, -1, -1)]
else:
    d = [2 ** i for i in range(30, -1, -1)] + [1]
print((len(d)))
print((*d))
for xpy, xmy in XY:
    s = ""
    p = 0
    m = 0
    for di in d:
        ps = 1 if p <= xpy else -1
        ms = 1 if m <= xmy else -1
        p += ps * di
        m += ms * di
        if ps == 1:
            s += "R" if ms == 1 else "U"
        else:
            s += "D" if ms == 1 else "L"
    print(s)


def d_robot_arms(N, Pos):
    # 参考: http://drken1215.hatenablog.com/entry/2018/09/30/002900

    pos = []
    # すべての座標でパリティが一致しなければ、条件を満たす腕を選べない
    parity = (abs(Pos[0][0]) + abs(Pos[0][1])) % 2
    for x, y in Pos:
        parity_current = (abs(x) + abs(y)) % 2
        if parity != parity_current:
            return -1
        pos.append([x - y, x + y])
        # u=x-y, v=x+y とすると、 点(u, v)は
        # 原点周りに45度回転させる座標変換によって点(x, y)から移される点

    # log2(10**9)=29.90 なので、2**30以下の2の冪乗を適当に選べば
    # xy平面上の x+y が奇数である任意の座標に到達できる
    arms = [1 << k for k in range(30, -1, -1)]
    if parity % 2 == 0:
        arms.append(1)  # x+yが偶数である座標に到達するときに必要

    # 腕の数, 長さのリストを最初に格納する(任意の入力に対して固定)
    ans_tmp = [str(len(arms)), ' '.join(list(map(str, arms)))]

    for pos_u, pos_v in pos:
        # u, v座標はそれぞれ独立に見て構わない
        usum, vsum = 0, 0
        tmp = ''
        for arm_len in arms:
            if usum <= pos_u:
                udir = 'positive'
                usum += arm_len
            else:
                udir = 'negative'
                usum -= arm_len

            if vsum <= pos_v:
                vdir = 'positive'
                vsum += arm_len
            else:
                vdir = 'negative'
                vsum -= arm_len

            # uv平面で軸と平行にどちら向きに移動するかと
            # xy平面での移動モード(UDLR)との対応
            if udir == 'positive' and vdir == 'positive':
                tmp += 'R'
            elif udir == 'positive' and vdir == 'negative':
                tmp += 'D'
            elif udir == 'negative' and vdir == 'negative':
                tmp += 'L'
            else:
                tmp += 'U'
        ans_tmp.append(''.join(tmp))
    ans = '\n'.join(ans_tmp)
    return ans

N = int(input())
Pos = [[int(i) for i in input().split()] for j in range(N)]
print(d_robot_arms(N, Pos))

N=int(input())

point = []
parity = {}
for _ in range(N) :
    x, y = list(map(int, input().split()))
    point.append((x, y))
    parity[(x + y) % 2] = 1

if len(set(parity)) == 2 :
    print('-1')
else :
    m = 38
    parity = 1 if (1 in parity) else 0
    print((m + 1 - parity))
    if parity == 1 :  # 距離が奇数
        print((*[1 << i for i in range(m)]))
    else :
        print((1, *[1 << i for i in range(m)]))

    def arm(x, y, m) :
        if abs(x) >= abs(y) :
            if x >= 0 :
                return ('R', x - (1<<m), y)
            else :
                return ('L', x + (1<<m), y)
        else :
            if y >= 0 :
                return ('U', x, y - (1<<m))
            else :
                return ('D', x, y + (1<<m))

    for x, y in point :
        ans = []
        for i in range(m-1, -1, -1) :
            mode, x, y = arm(x, y, i)
            ans.append(mode)
        if parity == 0 :  # 偶数の場合一つ足す
            if x == 1 :
                ans.append('R')
            elif x == -1 :
                ans.append('L')
            elif y == 1 :
                ans.append('U')
            elif y == -1 :
                ans.append('D')
        print((''.join(ans[::-1])))



def pow2(i):
    ret = 1
    while i!=1:
        i >>= 1
        ret <<= 1
    return ret

m = int(input())

points = []
max2 = -1
flag = True
bias = -1
for i in range(m):
    point = list(map(int,input().split()))
    dis = abs(point[0])+abs(point[1])
    if (dis > max2):
        max2 = dis
    if (bias!=-1 and dis%2 != bias%2):
        flag =False
    if (dis%2 == 0):
        point[0] -= 1 
    points.append(tuple(point))
    bias = dis%2
if flag == False:
    print("-1")
    return        

bias = max2%2
max2 = pow2(max2)
diss = []
dirctions = [""]*m
while max2>0:
    for i in range(m):
        point = points[i]
        
        if (point[1]>point[0] and point[1]>(-point[0])):
            dirctions[i] = "U"+dirctions[i]
            points[i] = (point[0],point[1]-max2)
        elif(point[1]>point[0] and point[1]<(-point[0])):
            dirctions[i] = "L"+dirctions[i]
            points[i] = (point[0]+max2,point[1])
        elif(point[1]<point[0] and point[1]>(-point[0])):
            dirctions[i] = "R"+dirctions[i]
            points[i] = (point[0]-max2,point[1])
        else:
            dirctions[i] = "D"+dirctions[i] 
            points[i] = (point[0],point[1]+max2)
    diss = [max2] + diss
    max2 >>= 1

if (bias == 0):
    diss = [1] + diss
    for i in range(m):
        dirctions[i] = "R"+dirctions[i]
print(len(diss))
for d in diss:
    print(str(d),end=" ")
print("")
for d in dirctions:
    print(d)


n = int(input())
grid = [list(map(int, input().split())) for i in range(n)]

for i in range(n - 1):
    if (grid[i][0] + grid[i][1]) % 2 != (grid[i + 1][0] + grid[i + 1][1]) % 2:
        print(-1)
        return
m = 31
D = [2 ** i for i in range(m)]
if (grid[0][0] + grid[0][1]) % 2 == 0:
    D.insert(0, 1)
    m += 1
w = [[] for i in range(n)]
for i, g in enumerate(grid):
    x, y = g
    for d in D[::-1]:
        if abs(x) >= abs(y):
            if x > 0:
                x -= d
                w[i].append('R')
            else:
                x += d
                w[i].append('L')
        else:
            if y > 0:
                y -= d
                w[i].append('U')
            else:
                y += d
                w[i].append('D')

print(m)
print(*D)
for ans in w:
    print(*ans[::-1], sep='')

n,*t=map(int,open(0).read().split())
*z,=zip(t[::2],t[1::2])
s=set((a+b)%2for a,b in z)
if len(s)>1:
  print(-1)
  return
s,*_=s
d=[2**(38-i)for i in range(39)]+[1]*(s<1)
print(len(d),*d)
for a,b in z:
  x=y=0
  o=''
  for i in d:
    if abs(a-x)>abs(b-y):
      f=a-x>0
      o+='LR'[f]
      x+=i*f or-i
    else:
      f=b-y>0
      o+='DU'[f]
      y+=i*f or-i
  print(o)

N = int(input())
XY = [tuple(map(int,input().split())) for i in range(N)]
guuki = (XY[0][0] + XY[0][1]) % 2
for x,y in XY:
    if (x+y)%2 != guuki:
        print(-1)
        return

arms = []
n = 1
for i in range(39):
    arms.append(n)
    n *= 2
if guuki==0:
    arms.append(1)
arms.reverse()

dirs = {'R':(1,0),'U':(0,1),'L':(-1,0),'D':(0,-1)}

print(len(arms))
print(*arms)
for x,y in XY:
    nx = ny = 0
    s = ''
    if guuki==0:
        nx += 1
        s += 'R'
    for a in arms[-39:]:
        dist = float('inf')
        dr = ''
        for d,(dx,dy) in dirs.items():
            tmp = abs(x - (nx+dx*a)) + abs(y - (ny+dy*a))
            if tmp < dist:
                dist = tmp
                dr = d
        dx,dy = dirs[dr]
        nx += dx*a
        ny += dy*a
        s += dr
    print(s)

N = int(input())
Points = [list(map(int, input().split())) for i in range(N)]
# X + Y の偶奇はすべて一致していなければならない
odds_even = set([(x + y) % 2 for x, y in Points])
if len(odds_even) != 1:
    print((-1))
    return

D = [2 ** i for i in range(39)]  # アームの長さ
D = D[::-1]  # 反転
if odds_even == {0}:  # 長さ1のアームを追加
    D.append(1)

print((len(D)))
print((' '.join(map(str, D))))
# 最も長いアームから考える
for tX, tY in Points:
    nX, nY = 0, 0
    ans = ''
    for d in D:
        uX, uY = nX, nY + d  # 上
        rX, rY = nX + d, nY  # 右
        dX, dY = nX, nY - d  # 下
        lX, lY = nX - d, nY  # 左

        diff_U = abs(tX - uX) + abs(tY - uY)
        diff_R = abs(tX - rX) + abs(tY - rY)
        diff_D = abs(tX - dX) + abs(tY - dY)
        diff_L = abs(tX - lX) + abs(tY - lY)

        Diff = [diff_U, diff_R, diff_D, diff_L]
        Command = ['U', 'R', 'D', 'L']
        Next = [[uX, uY], [rX, rY], [dX, dY], [lX, lY]]

        min_diff_index = Diff.index(min(Diff))

        ans += Command[min_diff_index]
        nX, nY = Next[min_diff_index]

    print(ans)


import sys

N = int(input())
XY = [tuple(map(int, input().split())) for _ in range(N)]

mod = sum(XY[0]) % 2
if any(mod != ((x+y)%2) for x, y in XY):
    print(-1)
    return

m = 33 - mod
print(m)
D = [2 ** i for i in range(31, -1, -1)]
if mod == 0:
    D.append(1)

print(' '.join(map(str, D)))
for x, y in XY:
    w = ''
    for d in D:
        if 0 <= x - y and 0 <= x + y:
            w += 'R'
            x -= d
        elif 0 > x - y and 0 <= x + y:
            w += 'U'
            y -= d
        elif 0 <= x - y and 0 > x + y:
            w += 'D'
            y += d
        else:
            w += 'L'
            x += d
    print(w)

n = int(input())
l = [list(map(int,input().split())) for i in range(n)]

m = [0]*2
for i,j in l:
    m[(i+j)%2] += 1
if m[0]*m[1]>0:
    print(-1)
    return

if m[1]>0:
    arm = [2**i for i in range(32)]
else:
    arm = [1]+[2**i for i in range(32)]

print(len(arm))
print(*arm)
for x,y in l:
    ans = []
    nx = x
    ny = y
    for i in arm[::-1]:
        if abs(nx) >= abs(ny):
            if nx >= 0:
                ans.append("R")
                nx -= i
            else:
                ans.append("L")
                nx += i
        else:
            if ny >= 0:
                ans.append("U")
                ny -= i
            else:
                ans.append("D")
                ny += i
    
    print(*ans[::-1],sep="")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**9)
n=int(input())
X,Y=[],[]
for _ in range(n):
    x,y=map(int,input().split())
    X.append(x)
    Y.append(y)
mod=(X[0]+Y[0])%2
for i in range(1,n):
    if (X[i]+Y[i])%2!=mod:
        print(-1)
        return
if not mod:
    X=[x+1 for x in X]
U=[X[i]+Y[i] for i in range(n)]
V=[X[i]-Y[i] for i in range(n)]
Mode=['L','D','U','R']
m=31
if mod:
    print(m)
    print(' '.join([str(2**i) for i in range(m)]))
else:
    print(m+1)
    print('1 '+' '.join([str(2**i) for i in range(m)]))
for i in range(n):
    w=''
    if not mod:
        w='L'
    ui=(U[i]+2**m-1)//2
    vi=(V[i]+2**m-1)//2
    for _ in range(m):
        u_bit,v_bit=ui&1,vi&1
        ui>>=1
        vi>>=1
        w+=Mode[u_bit*2+v_bit]
    print(w)

n = int(input())
XY = [list(map(int, input().split())) for _ in range(n)]
mod = sum(XY[0])%2
for x, y in XY:
    if mod != (x+y)%2:
        print(-1)
        return
m = 33-mod
print(m)
D = [2**i for i in range(31, -1, -1)]
if mod == 0:
    D.append(1)
print(" ".join(map(str, D)))
for x, y in XY:
    w = " "
    for d in D:
        if x-y >= 0 and x+y >= 0:
            w += "R"
            x -= d
        elif x-y < 0 and x+y >= 0:
            w += "U"
            y -= d
        elif x-y >= 0 and x+y < 0:
            w += "D"
            y += d
        else:
            w += "L"
            x += d
    print(w)

ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18

N=ri()
U=[0]*N #u = x + y
V=[0]*N #v = x - y
parity = 0
for i in range(N):
    x,y = rl()
    U[i],V[i] = format(x+y,'+032b'), format(x-y,'+032b')
    parity += (x+y)%2

if parity == 0 or parity == N:
    parity //= N
    m = 31 if parity else 32
    print(m)
    d = [1 for i in range(m)]
    for i in range(1,31):
        d[i] = d[i-1]*2
    d.sort(reverse=True)
    print(*d, sep=' ')

    for i in range(N):
        res = ''
        u,v = U[i],V[i]

        ub,vb = [1]+list(map(int,u[1:-1])), [1]+list(map(int,v[1:-1]))
        if not parity:
            ub += [0]
            vb += [0]
        if u[0] == '-': ub = list(map(lambda x: x^1, ub))
        if v[0] == '-': vb = list(map(lambda x: x^1, vb))

        for ub_,vb_ in zip(ub,vb):
            if ub_==0 and vb_==0:
                res += 'L'
            elif ub_==1 and vb_==1:
                res += 'R'
            elif ub_==0 and vb_==1:
                res += 'D'
            else:
                res += 'U'
        print(res)
else:
    print(-1)


n=int(input())
x=[0]*n
y=[0]*n
for i in range(n):
  x[i],y[i]=map(int,input().split())
  if(abs(x[i])+abs(y[i]))%2!=(abs(x[0])+abs(y[0]))%2:
    print(-1)
    return
D=[]
for i in reversed(range(33)):D.append(1<<i)
D+=[1,1]
if(abs(x[0])+abs(y[0]))%2==0:D.append(1)
print(len(D))
print(*D)
for i in range(n):
  X,Y=x[i],y[i]
  s=''
  for d in D:
    if abs(X)>abs(Y):
      if X>0:
        X-=d
        s+='R'
      else:
        X+=d
        s+='L'
    else:
      if Y>0:
        Y-=d
        s+='U'
      else:
        Y+=d
        s+='D'
  
  print(s)

n = int(input())
place = [tuple(map(int, input().split())) for _ in range(n)]
m = 0
def bitlist(x):
    ret = [0] * 31
    for i in reversed(range(31)):
        if x > 0:
            x -= 1 << i
            ret[i] = 1
        else:
            x += 1 << i
            ret[i] = -1
    return ret
pre = (place[0][0] + place[0][1] + 1) % 2
for x, y in place:
    if (x + y + 1) % 2 != pre:
        print(-1)
        return
print(31 + pre)
if pre:
    print(1, end = ' ')
for i in reversed(range(31)):
    print(1 << i, end = ' ')
print()
for x, y in place:
    u = x + y
    v = x - y
    if pre:
        u -= 1
        v -= 1
    ubit = bitlist(u)
    vbit = bitlist(v)
    if pre:
        print('R', end = '')
    for i in reversed(range(31)):
        if ubit[i] == 1 and vbit[i] == 1:
            print('R', end = '')
        elif ubit[i] == 1 and vbit[i] == -1:
            print('U', end = '')
        elif ubit[i] == -1 and vbit[i] == -1:
            print('L', end = '')
        else:
            print('D', end = '')
    print()


import sys
stdin = sys.stdin

sys.setrecursionlimit(10**5)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
xy = []
for _ in range(n):
    x,y = li()
    xy.append((x,y))
    
exist = True
    
eo = (xy[0][0]+xy[0][1]) % 2
for x,y in xy[1:]:
    if (x+y)%2 != eo:
        exist = False
    
if not exist:
    print(-1)
    
else:
    if eo == 1:
        arms = [2**i for i in range(40)]
        print(40)
        print(*arms[::-1])
        
    else:
        arms = [1] + [2**i for i in range(39)]
        print(40)
        print(*arms[::-1])
        
    for x,y in xy:
        u,v = x-y, x+y
        ucur, vcur = 0,0
        ans = ""
        for am in arms[::-1]:
            if ucur >= u and vcur >= v:
                ucur -= am
                vcur -= am
                ans += "L"
                
            elif ucur <= u and vcur <= v:
                ucur += am
                vcur += am
                ans += "R"
                
            elif ucur >= u and vcur <= v:
                ucur -= am
                vcur += am
                ans += "U"
                
            elif ucur <= u and vcur >= v:
                ucur += am
                vcur -= am
                ans += "D"
                
        print(ans)

import sys
input = sys.stdin.readline

import bisect

N=int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
r=(XY[0][0]+XY[0][1])%2
for i in range(N):
    if r != (XY[i][0]+XY[i][1])%2:
        print((-1))
        return

sumtwo=[]
mul = 2
for i in range(31):
    sumtwo.append(mul - 1)
    mul*=2


maxtwo=0
i_two=0
for i in range(N):
    if maxtwo < abs(XY[i][0])+abs(XY[i][1]):
        i_two = bisect.bisect_left(sumtwo, abs(XY[i][0])+abs(XY[i][1]))
        maxtwo = sumtwo[i_two]
ans=[2**i for i in range(i_two+1)]
if r==0:
    ans=[1]+ans
    i_two+=1
print((i_two+1))
print((*ans))
ans.reverse()

for i in range(N):
    ans2 = []
    nowx,nowy=XY[i]
    for j in range(i_two+1):
        if abs(nowx) < abs(nowy):
            if nowy < 0:
                ans2.append("D")
                nowy += ans[j]
            else:
                ans2.append("U")
                nowy -= ans[j]
        else:
            if nowx < 0:
                ans2.append("L")
                nowx += ans[j]
            else:
                ans2.append("R")
                nowx -= ans[j]
    ans2.reverse()
    print(("".join(ans2)))


# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return list(map(int, input().split()))
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N=INT()
XY=[[None] for i in range(N)]
x,y=MAP()
XY[0]=(x, y)
od_ev=(abs(x)+abs(y))%2
for i in range(1, N):
    x,y=MAP()
    # まず大前提として偶奇が合うかどうか
    if od_ev!=(abs(y)+abs(x))%2:
        print((-1))
        return
    XY[i]=(x, y)

# アームの作成(2冪で構成する)
arms=[]
for i in range(31, -1, -1):
    arms.append(2**i)
if od_ev==0: arms.append(1)
print((len(arms)))
print((*arms))

for i in range(N):
    ans=['']*len(arms)
    x,y=XY[i]
    # 斜めに交差するu座標とv座標を使う
    u=x+y
    v=x-y
    for j, arm in enumerate(arms):
        # uとvの正負の応じて、動かす方向を決める
        if u>=0 and v>=0:
            ans[j]='R'
            u-=arm
            v-=arm
        elif u>=0 and v<0:
            ans[j]='U'
            u-=arm
            v+=arm
        elif u<0 and v>=0:
            ans[j]='D'
            u+=arm
            v-=arm
        elif u<0 and v<0:
            ans[j]='L'
            u+=arm
            v+=arm
    print((''.join(ans)))


import sys
input = sys.stdin.readline

N=int(input())
ARM=[list(map(int,input().split())) for i in range(N)]

OE=[(ARM[i][0]+ARM[i][1])%2 for i in range(N)]

if len(set(OE))==2:
    print((-1))
    return

if OE[0]==1:
    
    m=38
    print(m)
    print((*[1<<i for i in range(m)]))

    def URLD(x,y,m):
        
        if abs(x)>=abs(y):
            if x>=0:
                return "R",(x-(1<<m),y)
            else:
                return "L",(x+(1<<m),y)

        else:
            if y>=0:
                return "U",(x,y-(1<<m))
            else:
                return "D",(x,y+(1<<m))

    for x,y in ARM:
        ANS=[]
        for i in range(m-1,-1,-1):
            a,(x,y)=URLD(x,y,i)
            ANS.append(a)

        print(("".join(ANS[::-1])))
        
else:

    m=39
    print(m)
    print((1,*[1<<i for i in range(m-1)]))

    def URLD(x,y,m):
        
        if abs(x)>=abs(y):
            if x>=0:
                return "R",(x-(1<<m),y)
            else:
                return "L",(x+(1<<m),y)

        else:
            if y>=0:
                return "U",(x,y-(1<<m))
            else:
                return "D",(x,y+(1<<m))

    for x,y in ARM:
        ANS=[]
        for i in range(m-2,-1,-1):
            a,(x,y)=URLD(x,y,i)
            ANS.append(a)

        if x==1:
            ANS.append("R")
        elif x==-1:
            ANS.append("L")
        elif y==1:
            ANS.append("U")
        else:
            ANS.append("D")

        print(("".join(ANS[::-1])))
    
            


import sys
import itertools
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
c = ['R', 'U', 'L', 'D']
n = int(input())
x = []
y = []
for i in range(n):
  xi, yi = map(int, input().split())
  x.append(xi)
  y.append(yi)
parity = None
for i in range(n):
  if i == 0:
    parity = (x[i] + y[i]) % 2
  elif (x[i] + y[i]) % 2 != parity:
    print(-1)
    return
print(40)
d = []
for i in range(20):
  d.append(3**i)
  d.append(3**i)
d[1] += parity
print(*d)
d = [1] * 40
d[1] += parity
for i in range(n):
  for m in range(20):
    for j, k in itertools.product(range(4), range(4)):
      xnew = x[i] - (d[2*m] * dx[j] + d[2*m+1] * dx[k])
      ynew = y[i] - (d[2*m] * dy[j] + d[2*m+1] * dy[k])
      if xnew % 3 == 0 and ynew % 3 == 0:
        x[i] = xnew // 3
        y[i] = ynew // 3
        print(c[j] + c[k], end='')
        break
  print('')

N = int(input())
XY = [tuple(map(int, input().split())) for _ in range(N)]
R = [abs(x-y)&1 for x, y in XY]
if not all(R[0] == r for r in R[1:]):
    print(-1)
    return
RM = max(abs(x)+abs(y) for x, y in XY)
D = [1 << i for i in range(32, -1, -1)]
if RM & 1 == 0:
    D.append(1)
W = ["" for _ in range(N)]
for d in D:
    for i in range(N):
        x, y = XY[i]
        if abs(x) > abs(y):
            if x > 0:
                x -= d
                W[i] += "R"
            else:
                x += d
                W[i] += "L"
        else:
            if y > 0:
                y -= d
                W[i] += "U"
            else:
                y += d
                W[i] += "D"
        XY[i] = (x, y)
print(len(D))
print(*D)
print(*W, sep="\n")

n = int(input())
x = [0] * n
y = [0] * n
for i in range(n):
    x[i], y[i] = list(map(int, input().split()))
p = x[0] + y[0] & 1
for i in range(n):
    if x[i] + y[i] & 1 != p:
        print((-1))
        return
d = ([1] if p == 0 else []) + [2 ** i for i in range(39)]
print((len(d)))
print((*d))

dx = [1,0,-1,0]
dy = [0,1,0,-1]
ch = 'LDRU'

for i in range(n):
    s, t = x[i], y[i]
    ans = []
    now = 2 ** 38
    for _ in range(len(d)):
        min_cur = 10 ** 18
        for i in range(4):
            ts, tt = s + dx[i] * now, t + dy[i] * now
            tm = abs(ts) + abs(tt)
            if tm < min_cur:
                ns, nt = ts, tt
                nc = ch[i]
                min_cur = tm
        s, t = ns, nt
        ans.append(nc)
        now = now // 2 if now > 1 else 1
    print((''.join(reversed(ans))))


from math import *

def L(xi, di):
    return xi - di

def R(xi, di):
    return xi + di

def D(yi, di):
    return yi - di

def U(yi, di):
    return yi + di

def main():
    N = int(input())
    x_list = [list(map(int, input().split())) for i in range(N)]
    sum_list = [x[0] + x[1] for x in x_list]
    checker = sum_list[0] % 2

    for wa in sum_list:
        if wa % 2 != checker:
            print("-1")
            return

    arm_list = []
    if checker == 0:
        arm_list.append(1)

    pow_i = 0
    max_sum = max(sum_list)
    while max_sum > sum(arm_list):
        arm_list.append(2 ** pow_i)
        pow_i += 1
    arm_list = sorted(arm_list, key=lambda x: -x)
    print(len(arm_list))
    print(" ".join(map(str, arm_list)))

    for c in x_list:
        now_c = [0,0]
        order = ""

        for arm in arm_list:
            dx = c[0] - now_c[0]
            dy = c[1] - now_c[1]

            if abs(dx) > abs(dy):
                if dx > 0:
                    order += "R"
                    now_c[0] = R(now_c[0], arm)
                else:
                    order += "L"
                    now_c[0] = L(now_c[0], arm)
            else:
                if dy > 0:
                    order += "U"
                    now_c[1] = U(now_c[1], arm)
                else:
                    order += "D"
                    now_c[1] = D(now_c[1], arm)
        print(order)

def __starting_point():
    main()
__starting_point()

import sys
#結局よくわからず解法見てしもた
#通ったし今度はリファクタリングや

def 解():
    iN = int(input())
    aP = [[int(_) for _ in sLine.rstrip("\n").split()] for sLine in sys.stdin.readlines()]

    iMod = sum(aP[0]) % 2
    for i in range(1,iN):
        if sum(aP[i]) % 2 != iMod :
            print("-1")
            return

    i最遠 = max([ abs(iX)+abs(iY) for iX , iY in aP])

    a腕 = [1]
    if iMod == 0 :
        a腕 = [1,1]

    for i in range(32):
        a腕.append(a腕[-1] * 2)
        if i最遠 // 2 < a腕[-1]:
            break

    a腕.reverse()
    iLen腕 = len(a腕)
    aRet = []
    for iX,iY in aP:
        aCommand=[]
        for i in range(iLen腕):
            if abs(iX) > abs(iY):
                if iX < 0 :
                    iX += a腕[i]
                    aCommand.append("L")
                else:
                    iX -= a腕[i]
                    aCommand.append("R")
            else:
                if iY < 0 :
                    iY += a腕[i]
                    aCommand.append("D")
                else:
                    iY -= a腕[i]
                    aCommand.append("U")
        aRet.append("".join(aCommand))

    print(iLen腕)
    print((" ".join([str(_) for _ in a腕])))
    sys.stdout.write("\n".join(aRet) + "\n")

def __starting_point():
    解()

__starting_point()

import sys

N = int(input())

co = []
x, y = map(int, input().split())
co.append((x, y))
Amod = (x + y) % 2
flag = True
max_co = abs(x) + abs(y)
for i in range(N - 1):
    x, y = map(int, input().split())
    co.append((x, y))

    if(Amod != (x + y) % 2):
        flag = False

    tmp = abs(x) + abs(y)
    max_co = max(max_co, tmp)

if(flag is False):
    print(-1)
    return

ex2 = [1, 2, 4, 8, 16, 32]
expo = 32
# print(maxxy)
while(expo < max_co):
    expo *= 2
    ex2.append(expo)


ans_list = []
for x, y in co:
    if Amod == 0:
        x -= 1
        ans = "R"
    else:
        ans = ""

    for arm in reversed(ex2):
        # print("present", x, y)
        if abs(x) > abs(y):
            if x > 0:
                x -= arm
                ans = "R" + ans
            else:
                x += arm
                ans = "L" + ans
        else:
            if y > 0:
                y -= arm
                ans = "U" + ans
            else:
                y += arm
                ans = "D" + ans
    # print(x, y)

    ans_list.append(ans)

if Amod == 0:
    ex2.append(1)

print(len(ex2))
arm = ""
for a in ex2:
    arm += " " + str(a)
print(arm[1:])
for a in ans_list:
    print(a)

import os
import sys

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


N = int(sys.stdin.buffer.readline())
XY = [list(map(int, sys.stdin.buffer.readline().split())) for _ in range(N)]

# マンハッタン距離の偶奇は全部同じじゃないとだめ
x, y = XY[0]
odd = (abs(x) + abs(y)) % 2
ok = True
for x, y in XY:
    ok &= (abs(x) + abs(y)) % 2 == odd

if not ok:
    print(-1)
    return


def solve(x):
    # a + b = 2^39 - 1
    # a - b = x
    # とおいて a を求める
    # 2a = 2^39 - 1 + x
    n = int((2 ** 39 - 1 + x) // 2)
    ret = []
    for _ in range(39):
        if n & 1:
            ret.append(1)
        else:
            ret.append(-1)
        n >>= 1
    ret = np.array(ret, dtype=int)
    return ret


P = [complex(x, y) for x, y in XY]
P = np.array(P)
# マンハッタン距離を奇数にする
# 原点を (-1, 0) だけずらす
if not odd:
    P -= 1
# 45度回転してみる
# アームの長さが決まってるとき、xとyについて独立にプラスマイナスを決められるようになる
P *= 1 + 1j

D = (2 ** np.arange(39, dtype=int)).tolist()
ans = []
for p in P:
    xd = solve(p.real)
    yd = solve(p.imag)
    W = np.empty_like(D, dtype='U1')
    W[(xd > 0) & (yd > 0)] = 'R'
    W[(xd > 0) & (yd < 0)] = 'D'
    W[(xd < 0) & (yd > 0)] = 'U'
    W[(xd < 0) & (yd < 0)] = 'L'
    ans.append(''.join(W))

if not odd:
    D.append(1)
    for i in range(len(ans)):
        ans[i] += 'R'
print(len(D))
print(*D)
print(*ans, sep='\n')


import sys
#結局よくわからず解法見てしもた
#これで通るかな

def 解():
    iN = int(input())
    aP = [[int(_) for _ in sLine.rstrip("\n").split()] for sLine in sys.stdin.readlines()]

    i最遠 = max([ abs(iX)+abs(iY) for iX , iY in aP])

    iMod = sum(aP[0]) % 2
    for i in range(1,iN):
        if sum(aP[i]) % 2 != iMod :
            print("-1")
            return
    a腕 = [1]
    if iMod == 0 :
        a腕 = [1,1]
    for i in range(32):
        a腕.append(a腕[-1] * 2)
        if i最遠 // 2 < a腕[-1]:
            break
    a腕.reverse()
    iLen腕 = len(a腕)
    print(iLen腕)
    print((" ".join([str(_) for _ in a腕])))
    aRet = []
    for aE in aP:
        aCommand=[]
        iX = aE[0]
        iY = aE[1]
        for i in range(iLen腕):
            if abs(iX) > abs(iY):
                if iX < 0 :
                    iX += a腕[i]
                    aCommand.append("L")
                else:
                    iX -= a腕[i]
                    aCommand.append("R")
            else:
                if iY < 0 :
                    iY += a腕[i]
                    aCommand.append("D")
                else:
                    iY -= a腕[i]
                    aCommand.append("U")
        aRet.append("".join(aCommand))
    sys.stdout.write("\n".join(aRet) + "\n")

def __starting_point():
    解()

__starting_point()

import sys
fin = sys.stdin.readline

N = int(fin())
coords = [[int(elem) for elem in fin().split(' ')] for _ in range(N)]
odd_or_even = abs((coords[0][0] + coords[0][1]) % 2)
max_sum = 0
for coord in coords:
    x, y = coord
    if (x + y) % 2 != odd_or_even:
        print((-1))
        return
    else:
        max_sum = max(max_sum, abs(x) + abs(y))

# partial solution (because m must not exceed 40)
def partial_solution(max_sum, coords):
    m = max_sum
    print(m)
    print((' '.join(['1'] * m)))
    for coord in coords:
        x, y = coord
        count = 0
        output = ""
        if x > 0:
            output += "R" * x
        else:
            output += "L" * abs(x)
        count += abs(x)

        if y > 0:
            output += "U" * y
        else:
            output += "D" * y
        count += abs(y)

        assert (m - count) % 2 == 0
        output += "LR" * ((m - count) // 2)
        print(output)
#partial_solution(max_sum, coords)

def padding(binary_expression):
    len_pad = 31 - len(binary_expression[2:])
    return "0" * len_pad + binary_expression[2:]


def full_solution(max_sum, coords, odd_or_even):
    mode_map = {(0, 0): "L",
                (1, 1): "R",
                (0, 1): "D",
                (1, 0): "U"}
    rotated_coords = [(x + y, x - y) for x, y in coords]
    d = []
    for i in range(31):
        d.append(2**i)  
    if odd_or_even == 1:
        m = 31
    else:
        m = 32
        d.append(1)
    print(m)
    print((" ".join([str(d_elem) for d_elem in d])))
    if odd_or_even == 1:
        for rotated_coord in rotated_coords:
            u, v = rotated_coord
            const_2pow31 = 2**31
            flags_u = list(padding(bin((u + const_2pow31 - 1) // 2)))[::-1]
            flags_v = list(padding(bin((v + const_2pow31 - 1) // 2)))[::-1]
            flags = [(int(fu), int(fv)) for fu, fv in zip(flags_u, flags_v)]
            output = "".join([mode_map[flag] for flag in flags])
            print(output)
    else:
        for rotated_coord in rotated_coords:
            u, v = rotated_coord
            u -= 1
            v -= 1
            const_2pow31 = 2**31
            flags_u = list(padding(bin((u + const_2pow31 - 1) // 2)))[::-1]
            flags_v = list(padding(bin((v + const_2pow31 - 1) // 2)))[::-1]
            flags = [(int(fu), int(fv)) for fu, fv in zip(flags_u, flags_v)]
            output = "".join([mode_map[flag] for flag in flags]) + "R"
            print(output)

full_solution(max_sum, coords, odd_or_even)


N = int(input())
XY = [list(map(int, input().split(" "))) for _ in range(N)]
parity = (XY[0][0] + XY[0][1]) % 2
maxXY = 0
for x, y in XY:
    if (x + y) % 2 != parity:
        print("-1")
        return
    maxXY = max(x+y, maxXY)
arm = [1, 1, ]
if parity == 1:
    arm[1] = 2

tmp = arm[1]
m = 2

for _ in range(40):
    tmp *= 2
    m += 1
    arm.append(tmp)
    if tmp > maxXY:
        break
print(m)
print((" ".join(map(str, arm))))
armR = arm[::-1]
for x, y in XY:
    nowX, nowY = [x, y]
    ansR = ""
    for l in armR:
        if abs(nowX) >= abs(nowY):
            if nowX >= 0:
                nowX -= l
                ansR += "R"
            else:
                nowX += l
                ansR += "L"
        else:
            if nowY >= 0:
                nowY -= l
                ansR += "U"
            else:
                nowY += l
                ansR += "D"
    print((ansR[::-1]))



N, *XY = map(int, open(0).read().split())
XY = list(zip(*[iter(XY)] * 2))

mod = sum(XY[0]) % 2
if any((x + y) % 2 != mod for x, y in XY):
    print(-1)
    return

D = [2 ** i for i in reversed(range(32))] + [1] * (mod == 0)
print(len(D))
print(*D)

for x, y in XY:
    A = []
    for d in D:
        if 0 <= x - y and 0 <= x + y:
            A.append("R")
            x -= d
        elif x - y < 0 and 0 <= x + y:
            A.append("U")
            y -= d
        elif 0 <= x - y and x + y < 0:
            A.append("D")
            y += d
        else:
            A.append("L")
            x += d

    print("".join(A))

n=int(input())
x=[0]*n
y=[0]*n
for i in range(n):
  x[i],y[i]=map(int,input().split())
  if(abs(x[i])+abs(y[i]))%2!=(abs(x[0])+abs(y[0]))%2:
    print(-1)
    return
D=[]
for i in reversed(range(33)):D.append(1<<i)
D+=[1,1]
if(abs(x[0])+abs(y[0]))%2==0:D.append(1)
print(len(D))
print(*D)
for i in range(n):
  X,Y=x[i],y[i]
  s=''
  for d in D:
    if abs(X)>abs(Y):
      if X>0:
        X-=d
        s+='R'
      else:
        X+=d
        s+='L'
    else:
      if Y>0:
        Y-=d
        s+='U'
      else:
        Y+=d
        s+='D'
  print(s)

n = int(input())
xy = [[int(item) for item in input().split()] for _ in range(n)]

# If mod2 changes, there are no answer
mod2 = (xy[0][0] + xy[0][1]) % 2
for x, y in xy:
    if (x + y) % 2 != mod2:
        print(-1)
        return

if mod2 == 1:
    print(31)
    print(" ".join([str(2**item) for item in range(31)]))
else:
    print(32)
    print("1 " + " ".join([str(2**item) for item in range(31)]))

for x, y in xy:
    if mod2 == 0:
        x -= 1
        print("R", end="")
    u = x + y
    v = x - y
    bits = [[0] * 31 for _ in range(2)]
    if u < 0:
        bits[0] = [1] * 31
        bits[0][30] = 0
    else:
        bits[0][30] = 1
    if v < 0:
        bits[1] = [1] * 31
        bits[1][30] = 0
    else:
        bits[1][30] = 1
    for i in range(30):
        if u >= 0 and abs(u)//2>>i & 1:
            bits[0][i] = 1
        if u < 0 and abs(u)//2>>i & 1:
            bits[0][i] = 0
        if v >= 0 and abs(v)//2>>i & 1:
            bits[1][i] = 1
        if v < 0 and abs(v)//2>>i & 1:
            bits[1][i] = 0
    for u_b, v_b in zip(bits[0], bits[1]):
        if u_b == 1 and v_b == 1:
            print("R", end="")
        elif u_b == 0 and v_b == 0:
            print("L", end="")
        elif u_b == 1 and v_b == 0:
            print("U", end="")
        elif u_b == 0 and v_b == 1:
            print("D", end="")
    print("")


def solve(x, y, d, m):
    ret = ""
    for i in range(m):
        if x + y >= 0 and x - y >= 0:
            ret += "R"
            x -= d[i]
        elif x + y >= 0 and x - y < 0:
            ret += "U"
            y -= d[i];
        elif x + y < 0 and x - y >= 0:
            ret += "D"
            y += d[i];
        else:
            ret += "L"
            x += d[i]
    print (ret)


def main():
    m = 34
    X, Y, d = [], [], []

    for i in range(32, 0, -1):
        d += [2**i]
    d += [1]

    N = int(input())
    even, odd = 0, 0

    for i in range(N):
        x, y = list(map(int, input().split()))
        X += [x]; Y += [y]
    
        if (abs(x) + abs(y)) % 2 == 0:
            even += 1
        else:
            odd += 1

    if even and odd:
        print((-1))
        return 0

    if odd:
        m -= 1
    else:
        d += [1]

    print(m)
    print((" ".join(map(str, d))))

    for i in range(N):
        solve(X[i], Y[i], d, m)

main()


import sys

N = int(input())
XY = list()
for i in range(N):
    XY.append(list(map(int, input().split(" "))))

eo = sum(XY[0]) % 2
for xy in XY:
    if (sum(xy) % 2 != eo):
        print((-1))
        return

m = 40 - eo
print(m)
D = [2 ** i for i in range(38, -1, -1)]
if eo == 0:
    D.append(1)

print((" ".join(map(str, D))))
for x, y in XY:
    w = ""
    for i in range(m):
        if 0 <= x - y and 0 <= x + y:
            w += "R"
            x -= D[i]
        elif 0 > x - y and 0 <= x + y:
            w += "U"
            y -= D[i]
        elif 0 <= x - y and 0 > x + y:
            w += "D"
            y += D[i]
        else:
            w += "L"
            x += D[i]
    print(w)


import sys

N = int(input())
XY = [[int(_) for _ in input().split()] for i in range(N)]

mc = [0, 0]
maxl = 0

for x, y in XY:
    l = abs(x) + abs(y)
    maxl = max(maxl, l)
    mc[l % 2] += 1

if mc[0] > 0 and mc[1] > 0:
    print((-1))
    return

def calc(sx, sy, ex, ey, d):
    dx, dy = ex - sx, ey - sy
    if dx > dy:
        if dx > -dy:
            return "R", sx + d, sy
        else:
            return "D", sx, sy - d
    else:
        if dx > -dy:
            return "U", sx, sy + d
        else:
            return "L", sx - d, sy

import math

l = math.ceil(math.log(maxl + 1, 2))

ms = [1 << i for i in range(l)][::-1]

rms = ms

if mc[0] > 0:
    rms = [1] + ms

print((len(rms)))
print((*rms))

for ex, ey in XY:
    x, y = 0, 0
    w = ""
    if mc[0] > 0:
        w = "R"
        x += 1
    for m in ms:
        d, x, y = calc(x, y, ex, ey, m)
        w += d
    print(w)



n = int(input())
XY = [list(map(int, input().split())) for _ in range(n)]
mod = sum(XY[0])%2
for x, y in XY:
    if mod != (x+y)%2:
        print((-1))
        return

m = 33-mod
print(m)
D = [2**i for i in range(31, -1, -1)]
if mod == 0:
    D.append(1)

print((" ".join(map(str, D))))
for x, y in XY:
    w = " "
    for d in D:
        if x-y >= 0 and x+y >= 0:
            w += "R"
            x -= d
        elif x-y < 0 and x+y >= 0:
            w += "U"
            y -= d
        elif x-y >= 0 and x+y < 0:
            w += "D"
            y += d
        else:
            w += "L"
            x += d
    print(w)



# チェックに漏れがあり、kyasper 11/21 2:28:53のプログラムだと間違い
# ----------
# 例：
# 3
# -2 1
# 1 0
# 1 -2
# ----------

from math import *

def L(xi, di):
    return xi - di

def R(xi, di):
    return xi + di

def D(yi, di):
    return yi - di

def U(yi, di):
    return yi + di

def main():
    N = int(input())
    x_list = [list(map(int, input().split())) for i in range(N)]
    sum_list = [abs(x[0]) + abs(x[1]) for x in x_list]
    checker = sum_list[0] % 2

    for wa in sum_list:
        if wa % 2 != checker:
            print("-1")
            return

    arm_list = []
    if checker == 0:
        arm_list.append(1)

    pow_i = 0
    max_sum = max(sum_list)
    while max_sum > sum(arm_list):
        arm_list.append(2 ** pow_i)
        pow_i += 1
    arm_list = sorted(arm_list, key=lambda x: -x)
    print(len(arm_list))
    print(" ".join(map(str, arm_list)))

    for c in x_list:
        now_c = [0,0]
        order = ""

        for arm in arm_list:
            dx = c[0] - now_c[0]
            dy = c[1] - now_c[1]

            if abs(dx) > abs(dy):
                if dx > 0:
                    order += "R"
                    now_c[0] = R(now_c[0], arm)
                else:
                    order += "L"
                    now_c[0] = L(now_c[0], arm)
            else:
                if dy > 0:
                    order += "U"
                    now_c[1] = U(now_c[1], arm)
                else:
                    order += "D"
                    now_c[1] = D(now_c[1], arm)
        print(order)

def __starting_point():
    main()
__starting_point()

import numpy as np
N = int(input())
XY = np.array([[int(x) for x in input().split()] for _ in range(N)],dtype=np.int64)
X = XY[:,0]
Y = XY[:,1]
command  = np.array([""]*N,dtype=object)

def solve(k,X,Y,arms,command):
    if k==-1:
        return final_solve(X,Y,arms,command)
    else:
        #大きい方を変換
        #print(X,Y)
        bl_X = (np.abs(X)>np.abs(Y))
        bl_Y = ~bl_X
        neg_X = (X<0)
        neg_Y = (Y<0)
        L = bl_X & neg_X
        R = bl_X & (~neg_X)
        U = bl_Y & (~neg_Y)
        D = bl_Y & neg_Y
        p = 1<<k
        command[L] += "L"
        command[R] += "R"
        command[U] += "U"
        command[D] += "D"
        X[L] +=p

        X[R] -=p

        Y[U] -=p

        Y[D] +=p

        arms.append(p)
        return solve(k-1,X,Y,arms,command)
def final_solve(X,Y,arms,command):
    s = np.abs(X)+np.abs(Y)
    b0 = (s==0).all()
    b1 = (s==1).all()
    if b0:
        return arms,command
    elif not b1:
        return None,None

    arms.append(1)
    L = (X==-1)
    R = (X==1)
    D = (Y==-1)
    U = (Y==1)
    command[L] += "L"
    command[R] += "R"
    command[U] += "U"
    command[D] += "D"
    return arms,command


arms,command = solve(35,X,Y,[],command)

if arms is None:
    print(-1)
else:
    print(len(arms))
    print(" ".join([str(i) for i in arms]))
    print("\n".join(command))