#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <numeric>
#include <queue>
#include <type_traits>
#include <fstream>
//#include <bits/stdc++.h>

typedef long double ld;
typedef long long ll;

const ll INF = (ll)1e18 + 1;
const ll MOD = 1e9 + 7;

// ll x = maximum(5, 4, 3, 2, 1);
// ll x = maximum(5, 4, 3, 2);
// ll y = minimum(5, 4, 3, 2, 1);
// ll y = minimum(5, 4, 3);
template<typename T> T maximum(T head, T tail) { return std::max(head, tail); }
template<typename Head, typename... Tail> Head maximum(Head head, Tail... tail) {
  return std::max(head, maximum(tail...));
}

template<typename T> T minimum(T head, T tail) { return std::min(head, tail); }
template<typename Head, typename... Tail> Head minimum(Head head, Tail... tail) {
  return std::min(head, minimum(tail...));
}

// print(x, y, z);
// printVec(va.begin(), va.end());
void print(){ std::cout << std::endl; }
template <typename Head> void print(Head&& head) { std::cout << head << std::endl; }
template <typename Head, typename... Tail> void print(Head&& head, Tail&&... tail)
{
  std::cout << head << " ";
  print(std::forward<Tail>(tail)...); // or print(tail...);
}
template<typename Iterator> void printVec(Iterator begin, Iterator end)
{
  std::cout << *begin;
  for (Iterator it = begin+1; it != end; it++) {
    std::cout << " " << *it;
  }
  std::cout << std::endl;
}

int main(int argc, char* argv[])
{
  //std::ifstream ifs("input2.def");
  //std::cin.rdbuf(ifs.rdbuf());

  ll N;
  std::cin >> N;
  std::vector< ll > vx(N);
  std::vector< ll > vy(N);
  std::vector< ll > vsum(N);
  for (ll i = 0; i < N; i++) {
    std::cin >> vx[i] >> vy[i];
    vsum[i] = std::abs(vx[i]) + std::abs(vy[i]);
  }

  ll mod = vsum[0] % 2;
  for (ll i = 1; i < N; i++) {
    if (vsum[i] % 2 != mod) {
      print(-1);
      return 0;
    }
  }

  // arm の個数
  ll arm_num = 31;
  ll first_step = 0;

  // X + Y が 偶数だった場合は, 1 ずらしておく必要がある
  if (mod == 0) arm_num++, first_step++;

  std::vector<ll> varm_length(arm_num, 0LL);
  if (mod == 0) varm_length[0] = 1LL;
  for (ll i = first_step; i < arm_num; i++) {
    varm_length[i] = 1LL<<(arm_num-i-1);
  }

  print(varm_length.size());
  printVec(varm_length.begin(), varm_length.end());


  for (ll i = 0; i < N; i++) {
    std::string mode;

    // 上下左右のひし形のどこにあるか調べるため, マンハッタン距離を使って判定
    for (ll j = 0; j < (ll)varm_length.size(); j++) {
      ll center_x, center_y;
      ll arm_length = varm_length[j];

      // X + Y が 偶数だった場合は, 1 ずらしておく必要がある
      if (j == 0 && mod == 0) {
	mode += 'R';
	vx[i]--;
	continue;
      }

      center_x = +arm_length; center_y = 0LL;
      if ((std::abs(vx[i] - center_x) + std::abs(vy[i] - center_y)) < arm_length ) {
	mode += 'R';
	vx[i] -= center_x;
	vy[i] -= center_y;
	continue;
      }

      center_x = -arm_length; center_y = 0LL;
      if ((std::abs(vx[i] - center_x) + std::abs(vy[i] - center_y)) < arm_length ) {
	mode += 'L';
	vx[i] -= center_x;
	vy[i] -= center_y;
	continue;
      }

      center_x = 0LL; center_y = +arm_length;
      if ((std::abs(vx[i] - center_x) + std::abs(vy[i] - center_y)) < arm_length ) {
	mode += 'U';
	vx[i] -= center_x;
	vy[i] -= center_y;
	continue;
      }

      center_x = 0LL; center_y = -arm_length;
      if ((std::abs(vx[i] - center_x) + std::abs(vy[i] - center_y)) < arm_length ) {
	mode += 'D';
	vx[i] -= center_x;
	vy[i] -= center_y;
	continue;
      }
    }
    print(mode);

    // 検算用
    //ll ans_x = 0LL, ans_y = 0LL;
    //for (ll i = 0; i < (ll)mode.size(); i++) {
    //  if (mode[i] == 'R') ans_x += varm_length[i];
    //  if (mode[i] == 'L') ans_x -= varm_length[i];
    //  if (mode[i] == 'U') ans_y += varm_length[i];
    //  if (mode[i] == 'D') ans_y -= varm_length[i];
    //}
    //print(ans_x, ans_y);
  }


  return 0;
}



Measured memory_bytes: 256