#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define pf push_front
#define mp make_pair
#define fi(a, b) for(int i=a; i<=b; i++)
#define fj(a, b) for(int j=a; j<=b; j++)
#define fo(a, b) for(int o=a; o<=b; o++)
#define fdi(a, b) for(int i=a; i>=b; i--)
#define fdj(a, b) for(int j=a; j>=b; j--)
#define fdo(a, b) for(int o=a; o>=b; o--)
#define clr(x) memset(x, 0, sizeof(x))
#define cpy(x,y) memcpy(x, y, sizeof(y))
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<ll> vl;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;

char __buffer[100000];

#ifdef _DEBUG
#define LOCAL
#endif

void err(const char *format, ... ) {
#ifdef LOCAL
	va_list ap;
	va_start(ap, format);
	vsprintf(__buffer, format, ap);
	va_end(ap);
	
	fprintf(stderr, "\t%s", __buffer);
#else
	if (format < 0) {
		__buffer[0]++;
	}
#endif
}

void errln(const char *format, ... ) {
#ifdef LOCAL
	va_list ap;
	va_start(ap, format);
	vsprintf(__buffer, format, ap);
	va_end(ap);
	
	fprintf(stderr, "\t%s\n", __buffer);
#else
	if (format < 0) {
		__buffer[0]++;
	}
#endif
}

void errln() {
#ifdef LOCAL	
	fprintf(stderr, "\n");
#endif	
}

double START_TIME;

void exit() {
#ifdef LOCAL	
	cerr << "TIME: " << setprecision(5) << fixed << (clock() - START_TIME) / CLOCKS_PER_SEC << endl;
#endif	
	exit(0);
}

template<typename A, typename B>
ostream& operator<<(ostream& os, pair<A, B> p) {
	os << "(" << p.first << ", " << p.second << ")";
	return os;
}

template<typename T>
ostream& operator<<(ostream& os, vector<T> v) {
	fi(0, sz(v) - 1) {
		os << v[i] << " ";
	}
	return os;
}

template<typename T>
ostream& operator<<(ostream& os, set<T> t) {
	for (auto z : t) {
		os << z << " ";
	}
	return os;
}

template<typename T1, typename T2>
ostream& operator<<(ostream& os, map<T1, T2> t) {
	cerr << endl;
	for (auto z : t) {
		os << "\t" << z.first << " -> " << z.second << endl;
	}
	return os;
}

#ifdef LOCAL
#define dbg(x) {cerr << __LINE__ << "\t" << #x << ": " << x << endl;}
#define dbg0(x, n) {cerr << __LINE__ << "\t" << #x << ": "; for (int ABC = 0; ABC < n; ABC++) cerr << x[ABC] << ' '; cerr << endl;}
#define dbg1(x, n) {cerr << __LINE__ << "\t" << #x << ": "; for (int ABC = 1; ABC <= n; ABC++) cerr << x[ABC] << ' '; cerr << endl;}
#else
#define dbg(x) while(0){}
#define dbg0(x, n) while(0){}
#define dbg1(x, n) while(0){}
#endif

#ifdef LOCAL
#define ass(x) if (!(x)) { cerr << __LINE__ << "\tassertion failed: " << #x << endl, abort(); }
#else
#define ass(x) assert(x)
#endif

///////////////////////////////////////////////////

const int MAX = 1041;

int n;
ll x[MAX];
ll y[MAX];

string ans[MAX];
ll d[MAX];
int k;

void bad() {
	printf("-1\n");
	exit();
}

char dir[4] = {'U', 'R', 'D', 'L'};
int dir2[256];

ll dx[4] = {0, 1, 0, -1};
ll dy[4] = {1, 0, -1, 0};

string find(ll x, ll y) {
	int p = k;
	string res;
	if (abs(x + y) % 2 == 0) {
		p--;
		x--;
		res += "L";
	}
	while (p > 0) {
		int who = -1;
		ll L = (1LL << (p - 1)) - 1;
		ll step = d[p];
		ll bx, by;
		err("x = %lld y = %lld L = %lld step = %lld\n", x, y, L, step);
		fo(0, 3) {
			ll x2 = x + dx[o] * step;
			ll y2 = y + dy[o] * step;
			if (abs(x2) <= L && abs(y2) <= L) {
				if (who == -1) {
					who = o;
					bx = x2;
					by = y2;	
				} else {
					if (abs(bx) + abs(by) > abs(x2) + abs(y2)) {
						who = o;
						bx = x2;
						by = y2;
					}
				}
			}
		}
		ass(who != -1);
		res += dir[who];
		x += dx[who] * step;
		y += dy[who] * step;
		p--;
	}

	reverse(res.begin(), res.end());
	fi(0, sz(res) - 1) {
		int cur = dir2[(int) res[i]];
		res[i] = dir[(cur + 2) % 4];
	}
	return res;
}

pll eval(string s) {
	ll x = 0;
	ll y = 0;
	fi(0, sz(s) - 1) {
		int dir = dir2[(int) s[i]];
		x += dx[dir] * d[i + 1];
		y += dy[dir] * d[i + 1];
	}
	return mp(x, y);
}

void solve() {
	dir2[(int) 'U'] = 0;
	dir2[(int) 'R'] = 1;
	dir2[(int) 'D'] = 2;
	dir2[(int) 'L'] = 3;

	int cnt[2] = {0, 0};
	fi(1, n) {
		cnt[abs(x[i] + y[i]) % 2]++;
	}
	if (cnt[0] > 0 && cnt[1] > 0) bad();

	k = 35;
//	k = 6;
	fi(1, k) {
		d[i] = (1LL << (i - 1));
	}
	if (cnt[0]) {
		k++;
		d[k] = 1LL;
	}
	fi(1, n) {
		ans[i] = find(x[i], y[i]);
		err("x = %lld y = %lld\n", x[i], y[i]);
		dbg(ans[i]);
		dbg1(d, k);
		dbg(eval(ans[i]));
#ifdef LOCAL		
		pll resp = eval(ans[i]);
		ass(resp.first == x[i] && resp.second == y[i]);
#endif
	}
	printf("%d\n", k);
	fi(1, k) {
		printf("%lld ", d[i]);
	}
	printf("\n");
	fi(1, n) {
		printf("%s\n", ans[i].c_str());
	}
}

int main() {
#ifdef LOCAL
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	START_TIME = (double)clock();
#endif

  scanf("%d", &n);
  fi(1, n) {
  	scanf("%lld %lld", &x[i], &y[i]);
  }
	solve();

	exit();
	return 0;
}





Measured memory_bytes: 384