// Slower C++ solution:
#include <cstdio>

#include <iostream>

#include <algorithm>

#include <cstring>

#include <vector>

#define PB push_back

#define pii pair<int,int>

#define fir first

#define sec second

#define ll long long

#define MP make_pair

using namespace std;

template <class T>

inline void rd(T &x) {

	x=0; char c=getchar(); int f=1;

	while(!isdigit(c)) { if(c=='-') f=-1; c=getchar(); }

	while(isdigit(c)) x=x*10-'0'+c,c=getchar(); x*=f;

}

const int N=1010;

int sgn(int x) { return x>0?1:-1; }

int Abs(int x) { return x>0?x:-x; }

ll Xi[N],Yi[N];

int n;

vector<char> s[N];

char dy(int x) { return x>0?'U':'D'; }

char dx(int x) { return x>0?'R':'L'; }

int main() {

	rd(n);

	for(int i=1;i<=n;++i) rd(Xi[i]),rd(Yi[i]);

	int ty=((Xi[1]+Yi[1])%2+2)%2;

	for(int i=2;i<=n;++i) if(((Xi[i]+Yi[i])%2+2)%2!=ty) {

		printf("-1");

		return 0;

	}

	if(ty==0) {

		for(int i=1;i<=n;++i) {

			if(Abs(Xi[i])>Abs(Yi[i])) {

				s[i].PB(dx(Xi[i]));

				Xi[i]-=sgn(Xi[i]);

			}

			else {

				s[i].PB(dy(Yi[i]));

				Yi[i]-=sgn(Yi[i]);

			}

		}

	}

	for(int j=30;j>=0;--j)

		for(int i=1;i<=n;++i)

			if(Abs(Xi[i])>Abs(Yi[i])) {

				s[i].PB(dx(Xi[i]));

				Xi[i]-=sgn(Xi[i])*(1ll<<j);

			}

			else {

				s[i].PB(dy(Yi[i]));

				Yi[i]-=sgn(Yi[i])*(1ll<<j);

			}

	printf("%d\n",31+(!ty));

	if(!ty) printf("1 ");

	for(int j=30;j>=0;--j) printf("%d ",(1<<j));

	puts("");

	for(int i=1;i<=n;++i) {

		for(int j=0;j<s[i].size();++j) printf("%c",s[i][j]);

		puts("");

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.156063402377519x):
#include<cstdio>

using namespace std;

#define N 1050

#define K 36

char as[N][K];

int p[N][2],n,is1,is2;

int main()

{

	scanf("%d",&n);

	for(int i=1;i<=n;i++)

	{

		scanf("%d%d",&p[i][0],&p[i][1]);p[i][0]*=-1,p[i][1]*=-1;

		if((p[i][0]+p[i][1])&1)is1=1;

		else is2=1;

	}

	if(is1&&is2){printf("-1\n");return 0;}

	if(is1)

	{

		printf("31\n");

		for(int i=0;i<=30;i++)printf("%d ",1<<i);

		printf("\n");

		for(int i=0;i<30;i++)

		{

			int le=1<<i;

			for(int j=1;j<=n;j++)

			{

				if(p[j][0]>>i&1)

				{

					if(p[j][1]>>i&2)

					{

						int tp1=p[j][0]+le;

						if(tp1>>i&2)p[j][0]-=le,as[j][i]='L';

						else p[j][0]+=le,as[j][i]='R';

					}

					else

					{

						int tp2=p[j][0]-le;

						if(tp2>>i&2)p[j][0]-=le,as[j][i]='L';

						else p[j][0]+=le,as[j][i]='R';

					}

				}

				else

				{

					if(p[j][0]>>i&2)

					{

						int tp1=p[j][1]+le;

						if(tp1>>i&2)p[j][1]-=le,as[j][i]='D';

						else p[j][1]+=le,as[j][i]='U';

					}

					else

					{

						int tp2=p[j][1]-le;

						if(tp2>>i&2)p[j][1]-=le,as[j][i]='D';

						else p[j][1]+=le,as[j][i]='U';

					}

				}

			}

			for(int i=1;i<=n;i++)

			if(p[i][1])as[i][30]=p[i][1]>0?'D':'U';else as[i][30]=p[i][0]>0?'L':'R';

		}

		for(int i=1;i<=n;i++)printf("%s\n",as[i]);

	}

	else

	{

		printf("32\n1 ");

		for(int i=0;i<=30;i++)printf("%d ",1<<i);

		printf("\n");

		for(int i=1;i<=n;i++)p[i][0]--,as[i][0]='L';

		for(int i=0;i<30;i++)

		{

			int le=1<<i;

			for(int j=1;j<=n;j++)

			{

				if(p[j][0]>>i&1)

				{

					if(p[j][1]>>i&2)

					{

						int tp1=p[j][0]+le;

						if(tp1>>i&2)p[j][0]-=le,as[j][i+1]='L';

						else p[j][0]+=le,as[j][i+1]='R';

					}

					else

					{

						int tp2=p[j][0]-le;

						if(tp2>>i&2)p[j][0]-=le,as[j][i+1]='L';

						else p[j][0]+=le,as[j][i+1]='R';

					}

				}

				else

				{

					if(p[j][0]>>i&2)

					{

						int tp1=p[j][1]+le;

						if(tp1>>i&2)p[j][1]-=le,as[j][i+1]='D';

						else p[j][1]+=le,as[j][i+1]='U';

					}

					else

					{

						int tp2=p[j][1]-le;

						if(tp2>>i&2)p[j][1]-=le,as[j][i+1]='D';

						else p[j][1]+=le,as[j][i+1]='U';

					}

				}

			}

			for(int i=1;i<=n;i++)if(p[i][1])as[i][31]=p[i][1]>0?'D':'U';else as[i][31]=p[i][0]>0?'L':'R';

		}

		for(int i=1;i<=n;i++)printf("%s\n",as[i]);

	}

}//