#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int ll;

#define all(x) x.begin(),x.end()

const ll mod = 1e9+7;
const ll INF = 1e9;
const ll MAXN = 1e9;

int main()
{
	int n;
	cin >> n;
	vector<ll> x(n),y(n);
	for(int i = 0; i < n; i++){
		cin >> x[i] >> y[i];
	}
	vector<ll> u(n),v(n);
	for(int i = 0; i < n; i++){
		u[i] = x[i] + y[i];
		v[i] = x[i]-y[i];
	}
	for(int i = 0; i < n; i++){
		if(abs(u[i]%2) != abs(u[0] %2)){
			cout << -1 << endl;
			return 0;
		}
	}

	int m = 31;
	vector<ll> d(m+1);
	for(int i = 0; i <= m; i++){
		d[i] = pow(2,m-i);
	}
	if(u[0] %2 == 0){
		d.push_back(1);
	}

	vector<ll> arm;
	vector<string> ans(n);
	for(int i = 0; i < n; i++){
		ll uu = 0,vv = 0;
		//cout << u[i] << " " << v[i] << endl;
		for(int j = 0; j < d.size(); j++){
			if(uu<u[i]){
				uu += d[j];
				if(vv<v[i]){
					vv += d[j];
					ans[i] += 'R';
				}else{
					vv -= d[j];
					ans[i] += 'U';
				}
			}else{
				 uu -= d[j];
				 if(vv<v[i]){
					vv += d[j];
					ans[i] += 'D';
				}else{
					vv -= d[j];
					ans[i] += 'L';
				}
			}
			//cout << uu << " " << vv << endl;
		}

		if(uu != u[i] || vv != v[i]){
			cout << -1 << endl;
			return 0;
		}
		// printf("\n");
	}


	cout << d.size() << endl;
	for(int i = 0; i < d.size(); i++){
		cout << d[i] << (i!=d.size()-1?" ":"\n");
	}
	for(int i = 0; i < n; i++){
		cout << ans[i] << endl;
	}

	return 0;
}