#include <bits/stdc++.h>
using namespace std;
//#define DEBUG_MODE
#define endl '\n'
#ifdef DEBUG_MODE
#define DEBUG(X) debug_func(X, #X)
#define DEBUG_ENDL endl
#define DEBUG_SEPARATOR_LINE cout<<"=================\n"
#else
#define DEBUG(X) 0
#define DEBUG_ENDL 0
#define DEBUG_SEPARATOR_LINE 0
#endif
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()
#define DEBUG_ENDL_S(S) ((S).size() ? "\n" : "")
template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
template <typename T, typename U> using P = pair<T, U>;
using ll = int64_t;
using PLL = P<ll, ll>;
template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename Head, typename... Tail> const Head& var_min(const Head &head, const Tail&... tail) { return min(head, var_min(tail...)); }
template <typename Head, typename... Tail> const Head& var_max(const Head &head, const Tail&... tail) { return max(head, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
void debug_func_preffix(const string &s) { if(s.size()) cout << s << " = "; }
template <typename T>
void debug_func(const T &t, const string &s = "") {
    debug_func_preffix(s);
    cout << t << DEBUG_ENDL_S(s);
}
template <typename T, typename U>
void debug_func(const P<T, U> &p, const string &s = "") {
    debug_func_preffix(s);
    cout << "(";
    debug_func(p.first);
    cout << ", ";
    debug_func(p.second);
    cout << ")" << DEBUG_ENDL_S(s);
}
template <typename T>
void debug_func(const V<T> &v, const string &s = "") {
    for(ll i = 0; i < v.size(); i++) {
        string t = s + "[" + to_string(i) + "]";
        debug_func(v[i], t);
    }
}

char instr(ll xp, ll yp) {
    if(xp == 1 && yp == 1) return 'R';
    if(xp == 1 && yp == 0) return 'D';
    if(xp == 0 && yp == 1) return 'U';
    if(xp == 0 && yp == 0) return 'L';
    assert(false);
}

bool solve() {
    ll N;
    cin >> N;
    V<PLL> XY(N);
    V<ll> last_one;
    bool is_zero = 0;
    for(PLL &p : XY) {
        ll x, y;
        cin >> x >> y;
        p = PLL(x, y);
        for(ll c : { abs(x - y), abs(x + y) }) {
            for(ll i = 0; i < 40; i++) {
                if(c == 0) {
                    is_zero = 1;
                    break;
                }
                if(c & (1ll << i)) {
                    last_one.push_back(i);
                    break;
                }
            }
        }
    }
    sort(ALL(last_one));
    auto ite = unique(ALL(last_one));
    last_one.erase(ite, last_one.end());
    cout << boolalpha;
    DEBUG(is_zero);
    DEBUG(last_one);
    /*
    if(last_one.size() >= 3) return 0;
    if((is_zero || last_one.size() >= 2) && last_one[0] == 0) return 0;
    //if(last_one.size() == 2 && last_one[0] + 1 != last_one[1]) return 0;
    */
    V<ll> D;
    for(ll i = 32; i >= last_one[0]; i--) D.push_back(1ll << i);
    if(last_one[0] > 0) for(ll i = 0; i < 2; i++) D.push_back(1ll << (last_one[0] - 1));
    V<string> S;
    for(ll i = 0; i < N; i++) {
        ll nowx = XY[i].first - XY[i].second;
        ll nowy = XY[i].first + XY[i].second;
        DEBUG(nowx);
        DEBUG(nowy);
        string s;
        for(ll d : D) {
            bool xp = (nowx >= 0);
            bool yp = (nowy >= 0);
            if(xp) nowx -= d;
            else   nowx += d;
            if(yp) nowy -= d;
            else   nowy += d;
            s += instr(xp, yp);
        }
        if(nowx || nowy) return 0;
        DEBUG(nowx);
        DEBUG(nowy);
        DEBUG_SEPARATOR_LINE;
        S.push_back(s);
    }
    cout << D.size() << endl;
    for(ll i = 0; i < D.size(); i++) cout << D[i] << " \n"[i + 1 == D.size()];
    for(const auto &s : S) cout << s << endl;
    return 1;
}

int main() {
    if(!solve()) cout << -1 << endl;
    return 0;
}


Measured memory_bytes: 384