//#include <numeric>
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <deque>
#include <string>
#include <string.h>
#include <vector>
#include <stack>
#include <queue>
#include <math.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <time.h>
#include <bitset>
#include <list>
#include <limits>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vstr;
typedef vector<char> vc;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 0x7FFFFFFF;//numeric_limits<int>::max();
long long INFF = 0x7FFFFFFFFFFFFFFF;//numeric_limits<long long>::max();
double PI = acos(-1.0);
int dirx[8] = {-1,0,0,1,-1,-1,1,1};
int diry[8] = {0,1,-1,0,-1,1,-1,1};

//#define TESTING
#ifdef TESTING
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define VALUE(x)
#define debug(...)
#endif

#define SIZE(v) (int)v.size()
#define FOR(a,b,c) for (int (a)=(b);(a)<(c);++(a))
#define FORN(a,b,c) for (int (a)=(b);(a)<=(c);++(a))
#define FORD(a,b,c) for (int (a)=(b);(a)>=(c);--(a))

//all zero
#define REP(i,n) FOR(i,0,n)
#define REPV(i,v) FOR(i,0,SIZE(v))
#define REPN(i,n) FORN(i,0,n)
#define REPD(i,n) FORD(i,n,0)
#define REPI(t,v,i) for(t::iterator i=v.begin();i!=v.end();i++)
#define REPI2(t1,t2,v,i) for(t1,t2::iterator i=v.begin();i!=v.end();i++)
#define MAX(a,b) a = max(a,b)
#define MIN(a,b) a = min(a,b)
#define RESET(a,b) memset(a,b,sizeof(a))
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(),v.end()
#define ALLA(arr,sz) arr,arr+sz
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
#define SORTA(arr,sz) sort(ALLA(arr,sz))
#define REVERSEA(arr,sz) reverse(ALLA(arr,sz))
#define PERMUTE next_permutation
#define FIND(m,i) m.find(i)!=m.end()
#define UNFIND(m,i) !(FIND(m,i))

#pragma region Functions

inline void scanf(int &d1){scanf("%d",&d1);}
inline void scanf(int &d1,int &d2){scanf("%d%d",&d1,&d2);}
inline void scanf(int &d1,int &d2,int &d3){scanf("%d%d%d",&d1,&d2,&d3);}
inline void scanf(ll &d1){scanf("%I64d",&d1);}
inline void scanf(ll &d1,ll &d2){scanf("%I64d%I64d",&d1,&d2);}
inline void scanf(ll &d1,ll &d2,ll &d3){scanf("%I64d%I64d%I64d",&d1,&d2,&d3);}
inline void scanf(char *temp){scanf("%s",temp);}

inline void printf(int d1){printf("%d\n",d1);}
inline void printf(int d1,int d2){printf("%d %d\n",d1,d2);}
inline void printf(double f1){printf("%.17g\n",f1);}
inline void printf(ll l1){printf("%I64d\n",l1);}
inline void printf(ll l1,ll l2){printf("%I64d %I64d\n",l1,l2);}
inline void printfcase(int id){printf("Case #%d:",id);}

inline string tostring(int a){char x[100];sprintf(x,"%d",a); string s = x;return s;}
inline void toupperstring(string &s){REPV(i,s){if(s[i]>='a'&&s[i]<='z'){s[i]=s[i]-'a'+'A';}}}//transform(s.begin(),s.end(),s.begin(),::toupper);
inline void tolowerstring(string &s){REPV(i,s){if(s[i]>='A'&&s[i]<='Z'){s[i]=s[i]-'A'+'a';}}}//transform(s.begin(),s.end(),s.begin(),::tolower);
inline int toint(string a){char x[100];int res;strcpy(x,a.c_str());sscanf(x,"%d",&res);return res;}

inline void freopen(string sin,string sout){freopen(sin.c_str(),"r",stdin);freopen(sout.c_str(),"w",stdout);}

template<typename T1, typename T2,typename T>
inline typename T::iterator findorinsert(T &m,const T1& t1,const T2 & t2){
	typename T::iterator iter = m.find(t1);
	if(iter == m.end()){m.insert(mp(t1,t2));return m.find(t1);}
	else{return iter;}
}

template<typename T>
inline T gcd(T u, T v){while(v != 0){T r = u%v;u = v;v = r;}return u;}

#pragma endregion

#pragma region Structs & Classes

template<typename T,int n>
struct Vector{
	T data[n];
	void read(){REP(i,n){cin>>data[i];}}
	inline T operator*(const Vector<T,n> &v) const{
		T res = 0;REP(i,n){res+=data[i]*v[i];}return res;
	}
	inline bool operator<(const Vector<T,n> &v) const{
		REP(i,n){if(data[i]!=v[i]){
			if(data[i]<0&&v[i]<0){
				return data[i]>v[i];
			}
			return data[i]<v[i];
		}}return false;
	}
	inline bool operator==(const Vector<T,n> &v) const{
		REP(i,n){if(data[i]!=v[i]){return false;}}return true;
	}
	inline T& operator[](int id){return data[id];}
	inline T operator[](int id) const{return data[id];}
	inline int size()const{return n;}
};

template<typename T>
inline Vector<T,2> make_vector(const T &t1,const T &t2){Vector<T,2> res = {t1,t2};return res;}
#define mv make_vector

template<typename T,int n>
struct Matrix{
	Vector<T,n> data[n];
	inline Vector<T,n> operator*(const Vector<T,n>& v) const{
		Vector<T,n> res;REP(i,n){res[i]=data[i]*v;}return res;
	}
	inline Matrix<T,n> operator*(const Matrix<T,n>& m)const{
		Matrix<T,n> res;REP(i,n){
			Vector<T,n> temp;REP(j,n){temp[j]=m[j][i];}REP(j,n){res[j][i]=data[j]*temp;}
		}
		return res;
	}
	static inline Matrix<T,n> identity(){
		Matrix<T,n> res;REP(i,n){memset(res[i].data,0,sizeof(T)*n);}REP(i,n){res[i][i]=1;}return res;
	}
	Vector<T,n>& operator[](int id){return data[id];}
	Vector<T,n> operator[](int id)const{return data[id];}
	int size() const{return n;}
};

template<typename T,int n>
class BIT{
public:
	BIT(int size = n){RESET(bit,0);this->size = size;}
	BIT(T* data,int size = n){
		this->size = size;for (int i=1;i<=size;i++){
			bit[i]=data[i-1];for (int j=i-1; j>i-lowbit(i); j--){bit[i]+=bit[j];}
		}
	}
	void edit(int i, T delta){for (int j = i+1; j <= size; j += lowbit(j)){bit[j] += delta;}}
	T sum(int k){
		T ans = 0;for (int i = k+1; i > 0; i -= lowbit(i)){ans += bit[i];}return ans;
	}
private:
	T bit[n+1];int size;
	inline int lowbit(int x) const{return x&(-x);}
};

class Prime{
public:
	Prime(int num){bits.resize(num+1,true);sieve();collect();}
	bool is_prime(int num) const{return bits[num];}
	int find1factor(int num) const{
		REPV(i,results){if(num%results[i] == 0){return results[i];}}return num;
	}
private:
	//start from 0
	vector<bool> bits;vector<int> results;
	void sieve(){
		bits[0] = false;bits[1] = false;
		for(int i = 2;i < SIZE(bits);++i){
			if(bits[i] == true){
				for(int j = 2;;++j){
					int v2 = j*i;if(v2 >= SIZE(bits)){break;}bits[v2] = false;
				}
			}
		}
	}
	void collect(){
		for(int i = 0;i < SIZE(bits);++i){if(bits[i]){results.push_back(i);}}
	}
};

template<int n,int m>
struct Graph{
	int head[n],edge_id;
	struct{
		int to,next;
	}edges[m];
	void init(int num = n){edge_id = 0;memset(head,-1,sizeof(int)*num);}
	int add(int from,int to){
		edges[edge_id].next = head[from];edges[edge_id].to = to;
		head[from] = edge_id;edge_id++;return head[from];
	}
	inline int next(int edge) const{return edges[edge].next;}
	inline int to(int edge) const{return edges[edge].to;}
};

#define REPG(g,id,e) for(int e = g.head[id];e != -1;e = g.next(e))

#pragma endregion

#define UNORDERED
#ifdef UNORDERED
#include <unordered_map>
#include <unordered_set>
typedef unordered_set<int> hashint;
template<class T>
inline void hash_combine(std::size_t & seed, const T & v){
	std::hash<T> hasher;seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
template<typename T,int n>
struct VectorHash{
	inline std::size_t operator()(const Vector<T,n> &v) const{
		std::size_t seed = 0;REP(i,n){hash_combine(seed,v[i]);}return seed;
	}
};
#endif

const int max_n = 100000;
typedef Vector<int,2> Vi2;
Vi2 data[max_n],datay[max_n];
int n,datan,datayn;

int main(){
	int dataxn = 0;
	scanf(n);
	REP(i,n){
		int x,y;
		scanf(x,y);
		if(x == 0){
			datay[datayn][0] = y;
			datay[datayn][1] = 0;
			datayn++;
		}
		else{
			data[datan][0] = y;
			data[datan][1] = x;
			datan++;
			if(y == 0){
				dataxn++;
			}
		}
	}
	SORTA(data,datan);
	SORTA(datay,datayn);
	int res = datayn*4 + datan*6 - dataxn*2;
	printf(res);
	REP(i,datayn){
		if(datay[i][0] > 0){
			printf("1 %d U\n",datay[i][0]);
			printf(2);
			printf("1 %d D\n",datay[i][0]);
			printf(3);
		}
		else{
			printf("1 %d D\n",-datay[i][0]);
			printf(2);
			printf("1 %d U\n",-datay[i][0]);
			printf(3);
		}
	}
	REP(i,datan){
		if(data[i][0] > 0){
			printf("1 %d U\n",data[i][0]);
		}
		else if(data[i][0] < 0){
			printf("1 %d D\n",-data[i][0]);
		}
		if(data[i][1] > 0){
			printf("1 %d R\n",data[i][1]);
		}
		else{
			printf("1 %d L\n",-data[i][1]);
		}
		printf(2);
		if(data[i][0] < 0){
			printf("1 %d U\n",-data[i][0]);
		}
		else if(data[i][0] > 0){
			printf("1 %d D\n",data[i][0]);
		}
		if(data[i][1] < 0){
			printf("1 %d R\n",-data[i][1]);
		}
		else{
			printf("1 %d L\n",data[i][1]);
		}
		printf(3);
	}
	return 0;
}


//#include <numeric>
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <deque>
#include <string>
#include <string.h>
#include <vector>
#include <stack>
#include <queue>
#include <math.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <time.h>
#include <bitset>
#include <list>
#include <limits>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vstr;
typedef vector<char> vc;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 0x7FFFFFFF;//numeric_limits<int>::max();
long long INFF = 0x7FFFFFFFFFFFFFFF;//numeric_limits<long long>::max();
double PI = acos(-1.0);
int dirx[8] = {-1,0,0,1,-1,-1,1,1};
int diry[8] = {0,1,-1,0,-1,1,-1,1};

//#define TESTING
#ifdef TESTING
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define VALUE(x)
#define debug(...)
#endif

#define SIZE(v) (int)v.size()
#define FOR(a,b,c) for (int (a)=(b);(a)<(c);++(a))
#define FORN(a,b,c) for (int (a)=(b);(a)<=(c);++(a))
#define FORD(a,b,c) for (int (a)=(b);(a)>=(c);--(a))

//all zero
#define REP(i,n) FOR(i,0,n)
#define REPV(i,v) FOR(i,0,SIZE(v))
#define REPN(i,n) FORN(i,0,n)
#define REPD(i,n) FORD(i,n,0)
#define REPI(t,v,i) for(t::iterator i=v.begin();i!=v.end();i++)
#define REPI2(t1,t2,v,i) for(t1,t2::iterator i=v.begin();i!=v.end();i++)
#define MAX(a,b) a = max(a,b)
#define MIN(a,b) a = min(a,b)
#define RESET(a,b) memset(a,b,sizeof(a))
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(),v.end()
#define ALLA(arr,sz) arr,arr+sz
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
#define SORTA(arr,sz) sort(ALLA(arr,sz))
#define REVERSEA(arr,sz) reverse(ALLA(arr,sz))
#define PERMUTE next_permutation
#define FIND(m,i) m.find(i)!=m.end()
#define UNFIND(m,i) !(FIND(m,i))

#pragma region Functions

inline void scanf(int &d1){scanf("%d",&d1);}
inline void scanf(int &d1,int &d2){scanf("%d%d",&d1,&d2);}
inline void scanf(int &d1,int &d2,int &d3){scanf("%d%d%d",&d1,&d2,&d3);}
inline void scanf(ll &d1){scanf("%I64d",&d1);}
inline void scanf(ll &d1,ll &d2){scanf("%I64d%I64d",&d1,&d2);}
inline void scanf(ll &d1,ll &d2,ll &d3){scanf("%I64d%I64d%I64d",&d1,&d2,&d3);}
inline void scanf(char *temp){scanf("%s",temp);}

inline void printf(int d1){printf("%d\n",d1);}
inline void printf(int d1,int d2){printf("%d %d\n",d1,d2);}
inline void printf(double f1){printf("%.17g\n",f1);}
inline void printf(ll l1){printf("%I64d\n",l1);}
inline void printf(ll l1,ll l2){printf("%I64d %I64d\n",l1,l2);}
inline void printfcase(int id){printf("Case #%d:",id);}

inline string tostring(int a){char x[100];sprintf(x,"%d",a); string s = x;return s;}
inline void toupperstring(string &s){REPV(i,s){if(s[i]>='a'&&s[i]<='z'){s[i]=s[i]-'a'+'A';}}}//transform(s.begin(),s.end(),s.begin(),::toupper);
inline void tolowerstring(string &s){REPV(i,s){if(s[i]>='A'&&s[i]<='Z'){s[i]=s[i]-'A'+'a';}}}//transform(s.begin(),s.end(),s.begin(),::tolower);
inline int toint(string a){char x[100];int res;strcpy(x,a.c_str());sscanf(x,"%d",&res);return res;}

inline void freopen(string sin,string sout){freopen(sin.c_str(),"r",stdin);freopen(sout.c_str(),"w",stdout);}

template<typename T1, typename T2,typename T>
inline typename T::iterator findorinsert(T &m,const T1& t1,const T2 & t2){
	typename T::iterator iter = m.find(t1);
	if(iter == m.end()){m.insert(mp(t1,t2));return m.find(t1);}
	else{return iter;}
}

template<typename T>
inline T gcd(T u, T v){while(v != 0){T r = u%v;u = v;v = r;}return u;}

#pragma endregion

#pragma region Structs & Classes

template<typename T,int n>
struct Vector{
	T data[n];
	void read(){REP(i,n){cin>>data[i];}}
	inline T operator*(const Vector<T,n> &v) const{
		T res = 0;REP(i,n){res+=data[i]*v[i];}return res;
	}
	inline bool operator<(const Vector<T,n> &v) const{
		REP(i,n){if(data[i]!=v[i]){
			if(data[i]<0&&v[i]<0){
				return data[i]>v[i];
			}
			return data[i]<v[i];
		}}return false;
	}
	inline bool operator==(const Vector<T,n> &v) const{
		REP(i,n){if(data[i]!=v[i]){return false;}}return true;
	}
	inline T& operator[](int id){return data[id];}
	inline T operator[](int id) const{return data[id];}
	inline int size()const{return n;}
};

template<typename T>
inline Vector<T,2> make_vector(const T &t1,const T &t2){Vector<T,2> res = {t1,t2};return res;}
#define mv make_vector

template<typename T,int n>
struct Matrix{
	Vector<T,n> data[n];
	inline Vector<T,n> operator*(const Vector<T,n>& v) const{
		Vector<T,n> res;REP(i,n){res[i]=data[i]*v;}return res;
	}
	inline Matrix<T,n> operator*(const Matrix<T,n>& m)const{
		Matrix<T,n> res;REP(i,n){
			Vector<T,n> temp;REP(j,n){temp[j]=m[j][i];}REP(j,n){res[j][i]=data[j]*temp;}
		}
		return res;
	}
	static inline Matrix<T,n> identity(){
		Matrix<T,n> res;REP(i,n){memset(res[i].data,0,sizeof(T)*n);}REP(i,n){res[i][i]=1;}return res;
	}
	Vector<T,n>& operator[](int id){return data[id];}
	Vector<T,n> operator[](int id)const{return data[id];}
	int size() const{return n;}
};

template<typename T,int n>
class BIT{
public:
	BIT(int size = n){RESET(bit,0);this->size = size;}
	BIT(T* data,int size = n){
		this->size = size;for (int i=1;i<=size;i++){
			bit[i]=data[i-1];for (int j=i-1; j>i-lowbit(i); j--){bit[i]+=bit[j];}
		}
	}
	void edit(int i, T delta){for (int j = i+1; j <= size; j += lowbit(j)){bit[j] += delta;}}
	T sum(int k){
		T ans = 0;for (int i = k+1; i > 0; i -= lowbit(i)){ans += bit[i];}return ans;
	}
private:
	T bit[n+1];int size;
	inline int lowbit(int x) const{return x&(-x);}
};

class Prime{
public:
	Prime(int num){bits.resize(num+1,true);sieve();collect();}
	bool is_prime(int num) const{return bits[num];}
	int find1factor(int num) const{
		REPV(i,results){if(num%results[i] == 0){return results[i];}}return num;
	}
private:
	//start from 0
	vector<bool> bits;vector<int> results;
	void sieve(){
		bits[0] = false;bits[1] = false;
		for(int i = 2;i < SIZE(bits);++i){
			if(bits[i] == true){
				for(int j = 2;;++j){
					int v2 = j*i;if(v2 >= SIZE(bits)){break;}bits[v2] = false;
				}
			}
		}
	}
	void collect(){
		for(int i = 0;i < SIZE(bits);++i){if(bits[i]){results.push_back(i);}}
	}
};

template<int n,int m>
struct Graph{
	int head[n],edge_id;
	struct{
		int to,next;
	}edges[m];
	void init(int num = n){edge_id = 0;memset(head,-1,sizeof(int)*num);}
	int add(int from,int to){
		edges[edge_id].next = head[from];edges[edge_id].to = to;
		head[from] = edge_id;edge_id++;return head[from];
	}
	inline int next(int edge) const{return edges[edge].next;}
	inline int to(int edge) const{return edges[edge].to;}
};

#define REPG(g,id,e) for(int e = g.head[id];e != -1;e = g.next(e))

#pragma endregion

#define UNORDERED
#ifdef UNORDERED
#include <unordered_map>
#include <unordered_set>
typedef unordered_set<int> hashint;
template<class T>
inline void hash_combine(std::size_t & seed, const T & v){
	std::hash<T> hasher;seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
template<typename T,int n>
struct VectorHash{
	inline std::size_t operator()(const Vector<T,n> &v) const{
		std::size_t seed = 0;REP(i,n){hash_combine(seed,v[i]);}return seed;
	}
};
#endif

const int max_n = 100000;
typedef Vector<int,2> Vi2;
Vi2 data[max_n],datay[max_n];
int n,datan,datayn;

int main(){
	int dataxn = 0;
	scanf(n);
	REP(i,n){
		int x,y;
		scanf(x,y);
		if(x == 0){
			datay[datayn][0] = y;
			datay[datayn][1] = 0;
			datayn++;
		}
		else{
			data[datan][0] = y;
			data[datan][1] = x;
			datan++;
			if(y == 0){
				dataxn++;
			}
		}
	}
	SORTA(data,datan);
	SORTA(datay,datayn);
	int res = datayn*4 + datan*6 - dataxn*2;
	printf(res);
	REP(i,datayn){
		if(datay[i][0] > 0){
			printf("1 %d U\n",datay[i][0]);
			printf(2);
			printf("1 %d D\n",datay[i][0]);
			printf(3);
		}
		else{
			printf("1 %d D\n",-datay[i][0]);
			printf(2);
			printf("1 %d U\n",-datay[i][0]);
			printf(3);
		}
	}
	REP(i,datan){
		if(data[i][0] > 0){
			printf("1 %d U\n",data[i][0]);
		}
		else if(data[i][0] < 0){
			printf("1 %d D\n",-data[i][0]);
		}
		if(data[i][1] > 0){
			printf("1 %d R\n",data[i][1]);
		}
		else{
			printf("1 %d L\n",-data[i][1]);
		}
		printf(2);
		if(data[i][1] < 0){
			printf("1 %d R\n",-data[i][1]);
		}
		else{
			printf("1 %d L\n",data[i][1]);
		}
		if(data[i][0] < 0){
			printf("1 %d U\n",-data[i][0]);
		}
		else if(data[i][0] > 0){
			printf("1 %d D\n",data[i][0]);
		}
		printf(3);
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <memory.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
int n;
pair<int, int> x[100000];
bool cmp(pair<int, int> a, pair<int, int> b){
    a.first = abs(a.first);
    b.first = abs(b.first);
    a.second = abs(a.second);
    b.second = abs(b.second);
    return a < b;
}
string tostr(int a){
    string s;
    while (a){
        s = s + (char)('0' + (a % 10));
        a /= 10;
    }
    reverse(s.begin(), s.end());
    return s;
}
vector<string> op;
int main(){
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> x[i].first >> x[i].second;
    }
    sort(x, x + n,cmp);
    for (int i = 0; i < n; i++){
        if (x[i].first>0){
            op.push_back("1 " + tostr(x[i].first) + " R");
            if (x[i].second > 0){
                op.push_back("1 " + tostr(x[i].second) + " U");
                op.push_back("2");
                op.push_back("1 " + tostr(x[i].second) + " D");
                op.push_back("1 " + tostr(x[i].first) + " L");
                op.push_back("3");
            }
            if (x[i].second < 0){
                op.push_back("1 " + tostr(-x[i].second) + " D");
                op.push_back("2");
                op.push_back("1 " + tostr(-x[i].second) + " U");
                op.push_back("1 " + tostr(x[i].first) + " L");
                op.push_back("3");
            }
        }
        if (x[i].first < 0){
            op.push_back("1 " + tostr(-x[i].first) + " L");
            if (x[i].second > 0){
                op.push_back("1 " + tostr(x[i].second) + " U");
                op.push_back("2");
                op.push_back("1 " + tostr(x[i].second) + " D");
                op.push_back("1 " + tostr(-x[i].first) + " R");
                op.push_back("3");
            }
            if (x[i].second < 0){
                op.push_back("1 " + tostr(-x[i].second) + " D");
                op.push_back("2");
                op.push_back("1 " + tostr(-x[i].second) + " U");
                op.push_back("1 " + tostr(-x[i].first) + " R");
                op.push_back("3");
            }
        }
    }
    cout << op.size() << endl;
    for (int i = 0; i < op.size(); i++)
        cout << op[i] << endl;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <memory.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
int n;
pair<int, int> x[100000];
bool cmp(pair<int, int> a, pair<int, int> b){
    a.first = abs(a.first);
    b.first = abs(b.first);
    a.second = abs(a.second);
    b.second = abs(b.second);
    return a < b;
}
string tostr(int a){
    string s;
    while (a){
        s = s + (char)('0' + (a % 10));
        a /= 10;
    }
    reverse(s.begin(), s.end());
    return s;
}
vector<string> op;
int main(){
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> x[i].first >> x[i].second;
    }
    sort(x, x + n,cmp);
    for (int i = 0; i < n; i++){
        if (x[i].first>0){
            op.push_back("1 " + tostr(x[i].first) + " R");
            if (x[i].second > 0){
                op.push_back("1 " + tostr(x[i].second) + " U");
                op.push_back("2");
                op.push_back("1 " + tostr(x[i].second) + " D");
                op.push_back("1 " + tostr(x[i].first) + " L");
                op.push_back("3");
            }
            else{
                if (x[i].second < 0){
                    op.push_back("1 " + tostr(-x[i].second) + " D");
                    op.push_back("2");
                    op.push_back("1 " + tostr(-x[i].second) + " U");
                    op.push_back("1 " + tostr(x[i].first) + " L");
                    op.push_back("3");
                }
                else{
                    op.push_back("2");
                    op.push_back("1 " + tostr(x[i].first) + " L");
                    op.push_back("3");
                }
            }
        }
        if (x[i].first < 0){
            op.push_back("1 " + tostr(-x[i].first) + " L");
            if (x[i].second > 0){
                op.push_back("1 " + tostr(x[i].second) + " U");
                op.push_back("2");
                op.push_back("1 " + tostr(x[i].second) + " D");
                op.push_back("1 " + tostr(-x[i].first) + " R");
                op.push_back("3");
            }
            else{
                if (x[i].second < 0){
                    op.push_back("1 " + tostr(-x[i].second) + " D");
                    op.push_back("2");
                    op.push_back("1 " + tostr(-x[i].second) + " U");
                    op.push_back("1 " + tostr(-x[i].first) + " R");
                    op.push_back("3");
                }
                else{
                    op.push_back("2");
                    op.push_back("1 " + tostr(-x[i].first) + " R");
                    op.push_back("3");
                }
            }
        }
    }
    cout << op.size() << endl;
    for (int i = 0; i < op.size(); i++)
        cout << op[i] << endl;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <memory.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
int n;
pair<int, int> x[100000];
bool cmp(pair<int, int> a, pair<int, int> b){
    a.first = abs(a.first);
    b.first = abs(b.first);
    a.second = abs(a.second);
    b.second = abs(b.second);
    return a < b;
}
string tostr(int a){
    string s;
    while (a){
        s = s + (char)('0' + (a % 10));
        a /= 10;
    }
    reverse(s.begin(), s.end());
    return s;
}
vector<string> op;
int main(){
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> x[i].first >> x[i].second;
    }
    sort(x, x + n,cmp);
    for (int i = 0; i < n; i++){
        if (x[i].first>0){
            op.push_back("1 " + tostr(x[i].first) + " R");
            if (x[i].second > 0){
                op.push_back("1 " + tostr(x[i].second) + " U");
                op.push_back("2");
                op.push_back("1 " + tostr(x[i].second) + " D");
                op.push_back("1 " + tostr(x[i].first) + " L");
                op.push_back("3");
            }
            else{
                if (x[i].second < 0){
                    op.push_back("1 " + tostr(-x[i].second) + " D");
                    op.push_back("2");
                    op.push_back("1 " + tostr(-x[i].second) + " U");
                    op.push_back("1 " + tostr(x[i].first) + " L");
                    op.push_back("3");
                }
                else{
                    op.push_back("2");
                    op.push_back("1 " + tostr(x[i].first) + " L");
                    op.push_back("3");
                }
            }
        }
        else{
            if (x[i].first < 0){
                op.push_back("1 " + tostr(-x[i].first) + " L");
                if (x[i].second > 0){
                    op.push_back("1 " + tostr(x[i].second) + " U");
                    op.push_back("2");
                    op.push_back("1 " + tostr(x[i].second) + " D");
                    op.push_back("1 " + tostr(-x[i].first) + " R");
                    op.push_back("3");
                }
                else{
                    if (x[i].second < 0){
                        op.push_back("1 " + tostr(-x[i].second) + " D");
                        op.push_back("2");
                        op.push_back("1 " + tostr(-x[i].second) + " U");
                        op.push_back("1 " + tostr(-x[i].first) + " R");
                        op.push_back("3");
                    }
                    else{
                        op.push_back("2");
                        op.push_back("1 " + tostr(-x[i].first) + " R");
                        op.push_back("3");
                    }
                }
            }
            else{
                if (x[i].second > 0){
                    op.push_back("1 " + tostr(x[i].second) + " U");
                    op.push_back("2");
                    op.push_back("1 " + tostr(x[i].second) + " D");
                    op.push_back("3");
                }
                else{
                    if (x[i].second < 0){
                        op.push_back("1 " + tostr(-x[i].second) + " D");
                        op.push_back("2");
                        op.push_back("1 " + tostr(-x[i].second) + " U");
                        op.push_back("3");
                    }
                    else{
                        op.push_back("2");
                        op.push_back("3");
                    }
                }
            }
        }
    }
    cout << op.size() << endl;
    for (int i = 0; i < op.size(); i++)
        cout << op[i] << endl;
}


#define _USE_MATH_DEFINES
#include <algorithm>
#include <functional>
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <cstring>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <map>
using namespace std;

typedef long long int64;
typedef vector<int> vi;
typedef pair<int,int> pii;

#define all(c) (c).begin(),(c).end()
#define sz(c) (int)(c).size()
#define sqr(x) (x)*(x)
#define cpresent(c,v) (find(all(c),(v)) != (c).end())
#define inf 2 * 1000 * 1000 * 1000
#define linf 9LL * 1000 * 1000 * 1000 * 1000 * 1000 * 1000
#define eps 1e-8

pii xy[100500];

bool comp( pii &a, pii &b) {
	return a.first + a.second < b.first + b.second;
}

int main()
{
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//freopen("info.txt","r",stdin);
	//freopen("info.txt","w",stdout);

	//cin.tie(0);
	int n; cin >> n;
	int cnt = 0;
	for(int i = 0; i < n; i++) {
		int x,y; scanf("%d%d",&x,&y);
		cnt += 2*(x!=0) + 2*(y!=0);
		xy[i].first = x; xy[i].second = y;
	} cnt += n*2;

	sort(xy,xy+n,comp);

	cout << cnt << "\n";
	for(int i = 0; i < n; i++) {
		int x = xy[i].first, y = xy[i].second;
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "R\n" : "L\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "U\n" : "D\n"));
		printf("2\n");
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "L\n" : "R\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "D\n" : "U\n"));
		printf("3\n");
	}

	return 0;
}


#define _USE_MATH_DEFINES
#include <algorithm>
#include <functional>
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <cstring>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <map>
using namespace std;

typedef long long int64;
typedef vector<int> vi;
typedef pair<int,int> pii;

#define all(c) (c).begin(),(c).end()
#define sz(c) (int)(c).size()
#define sqr(x) (x)*(x)
#define cpresent(c,v) (find(all(c),(v)) != (c).end())
#define inf 2 * 1000 * 1000 * 1000
#define linf 9LL * 1000 * 1000 * 1000 * 1000 * 1000 * 1000
#define eps 1e-8

pii xy[100500];

bool comp(pii &a, pii &b) {
	return abs(a.first + a.second) < abs(b.first + b.second);
}

int main()
{
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//freopen("info.txt","r",stdin);
	//freopen("info.txt","w",stdout);

	//cin.tie(0);
	int n; cin >> n;
	int cnt = 0;
	for(int i = 0; i < n; i++) {
		int x,y; scanf("%d%d",&x,&y);
		cnt += 2*(x!=0) + 2*(y!=0);
		xy[i].first = x; xy[i].second = y;
	} cnt += n*2;

	sort(xy,xy+n,comp);

	cout << cnt << "\n";
	for(int i = 0; i < n; i++) {
		int x = xy[i].first, y = xy[i].second;
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "R\n" : "L\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "U\n" : "D\n"));
		printf("2\n");
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "L\n" : "R\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "D\n" : "U\n"));
		printf("3\n");
	}

	return 0;
}


#define _USE_MATH_DEFINES
#include <algorithm>
#include <functional>
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <cstring>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <map>
using namespace std;

typedef long long int64;
typedef vector<int> vi;
typedef pair<int,int> pii;

#define all(c) (c).begin(),(c).end()
#define sz(c) (int)(c).size()
#define sqr(x) (x)*(x)
#define cpresent(c,v) (find(all(c),(v)) != (c).end())
#define inf 2 * 1000 * 1000 * 1000
#define linf 9LL * 1000 * 1000 * 1000 * 1000 * 1000 * 1000
#define eps 1e-8

pii xy[100500];

bool comp(pii &a, pii &b) {
	return abs(a.first) + abs(a.second) < abs(b.first) + abs(b.second);
}

int main()
{
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//freopen("info.txt","r",stdin);
	//freopen("info.txt","w",stdout);

	//cin.tie(0);
	int n; cin >> n;
	int cnt = 0;
	for(int i = 0; i < n; i++) {
		int x,y; scanf("%d%d",&x,&y);
		cnt += 2*(x!=0) + 2*(y!=0);
		xy[i].first = x; xy[i].second = y;
	} cnt += n*2;

	sort(xy,xy+n,comp);

	cout << cnt << "\n";
	for(int i = 0; i < n; i++) {
		int x = xy[i].first, y = xy[i].second;
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "R\n" : "L\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "U\n" : "D\n"));
		printf("2\n");
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "L\n" : "R\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "D\n" : "U\n"));
		printf("3\n");
	}

	return 0;
}


#define _USE_MATH_DEFINES
#include <algorithm>
#include <functional>
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <cstring>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <map>
using namespace std;

typedef long long int64;
typedef vector<int> vi;
typedef pair<int,int> pii;

#define all(c) (c).begin(),(c).end()
#define sz(c) (int)(c).size()
#define sqr(x) (x)*(x)
#define cpresent(c,v) (find(all(c),(v)) != (c).end())
#define inf 2 * 1000 * 1000 * 1000
#define linf 9LL * 1000 * 1000 * 1000 * 1000 * 1000 * 1000
#define eps 1e-8

int xi[100500],yi[100500];

int main()
{
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//freopen("info.txt","r",stdin);
	//freopen("info.txt","w",stdout);

	//cin.tie(0);
	int n; cin >> n;
	int cnt = 0;
	for(int i = 0; i < n; i++)
		scanf("%d%d",xi+i,yi+i),
		cnt += 2*(xi[i]!=0) + 2*(yi[i]!=0);
	cnt += n*2;

	cout << cnt << "\n";
	for(int i = 0; i < n; i++) {
		int x = xi[i], y = yi[i]; scanf("%d%d",&x,&y);
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "R\n" : "L\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "U\n" : "D\n"));
		printf("2\n");
		if(x)
			printf("1 %d %s",abs(x),((x>0) ? "L\n" : "R\n"));
		if(y)
			printf("1 %d %s",abs(y),((y>0) ? "D\n" : "U\n"));
		printf("3\n");
	}

	return 0;
}


#include <stdio.h>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
#include <map>
#include<cstdio>
#include <vector>
#include <algorithm>

using namespace std;

const int N = 100005;
const int t = 320;
struct arar
{
	int x,y;
}a[100000];

bool cmp(const arar& a, const arar& b)
{
    return a.y==b.y? (abs(a.x)<abs(b.x) ): (abs(a.y)<abs(b.y));
}

int main()
{
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	int n,i;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i].x>>a[i].y;
	sort(a,a+n,cmp);

	int bomb=0;
    for(int i=0;i<n;i++)
        bomb+=2*(1+(a[i].x!=0)+(a[i].y!=0));
    cout<<bomb<<endl;
    for(int i=0;i<n;i++)
    {
        if(a[i].x) printf("1 %d %c\n",abs(a[i].x),a[i].x>0?'R':'L');
        if(a[i].y) printf("1 %d %c\n",abs(a[i].y),a[i].y>0?'U':'D');
        printf("2\n");
        if(a[i].y) printf("1 %d %c\n",abs(a[i].y),a[i].y>0?'D':'U');
        if(a[i].x) printf("1 %d %c\n",abs(a[i].x),a[i].x>0?'L':'R');
        printf("3\n");
    }
	return 0;
}


#include <stdio.h>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
#include <map>
#include<cstdio>
#include <vector>
#include <algorithm>

using namespace std;

const int N = 100005;
const int t = 320;
struct arar
{
	int x,y;
}a[100000];

bool cmp(const arar& a, const arar& b)
{
    return a.y==b.y? (abs(a.x)<abs(b.x) ): (abs(a.y)<abs(b.y));
}

int main()
{
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	int n,i;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i].x>>a[i].y;
	sort(a,a+n,cmp);

	int bomb=0;
    for(int i=0;i<n;i++)
        bomb+=2*(1+(a[i].x!=0)+(a[i].y!=0));
  //  cout<<bomb;
    for(int i=0;i<n;i++)
    {
        if(a[i].x) printf("1 %d %c\n",abs(a[i].x),a[i].x>0?'R':'L');
        if(a[i].y) printf("1 %d %c\n",abs(a[i].y),a[i].y>0?'U':'D');
        printf("2\n");
        if(a[i].y) printf("1 %d %c\n",abs(a[i].y),a[i].y>0?'D':'U');
        if(a[i].x) printf("1 %d %c\n",abs(a[i].x),a[i].x>0?'L':'R');
        printf("3\n");
    }
	return 0;
}


#include<cstdio>
#include<iostream>
#include<cstring>
#include<cstdlib>
#include <cmath>
#include <algorithm>
#include<deque>
using namespace std;
#define ls(a) ((a)<<1)
#define rs(a) (((a)<<1)+1)
#define fa(a) ((a)>>1)
#define ll long long
#define pub push_back
#define pob pop_back
#define pof pop_front
#define puf push_front
const int N=1e5+1;
struct ss{
    int x,y;
    ll dis;
}s[N];
int n;
bool cmp(ss a,ss b);
int main()
{
    int i,z;
    ll a,b;
    scanf("%d",&n);
    for(z=0,i=1;i<=n;i++){
        scanf("%d%d",&s[i].x,&s[i].y);
        a=s[i].x;
        b=s[i].y;
        if(s[i].x==0||s[i].y==0)
            z++;
        s[i].dis=a*a+b*b;
    }
    sort(s+1,s+n+1,cmp);
    printf("%d\n",6*n-2*z);
    for(i=1;i<=n;i++){
        if(s[i].x!=0){
            if(s[i].x>0){
                printf("1 %d R\n",s[i].x);
            }
            else{
                printf("1 %d L\n",-s[i].x);
            }
        }
        if(s[i].y!=0){
            if(s[i].y>0){
                printf("1 %d U\n",s[i].y);
            }
            else{
                printf("1 %d D\n",-s[i].y);
            }
        }
        printf("2\n");
        if(s[i].x!=0){
            if(s[i].x>0){
                printf("1 %d L\n",s[i].x);
            }
            else{
                printf("1 %d R\n",-s[i].x);
            }
        }
        if(s[i].y!=0){
            if(s[i].y>0){
                printf("1 %d D\n",s[i].y);
            }
            else{
                printf("1 %d U\n",-s[i].y);
            }
        }
        printf("3\n");
    }
}
bool cmp(ss a,ss b)
{
    return a.dis<b.dis;
}


#include<cstdio>
#include<iostream>
#include<cstring>
#include<cstdlib>
#include <cmath>
#include <algorithm>
#include<deque>
using namespace std;
#define ls(a) ((a)<<1)
#define rs(a) (((a)<<1)+1)
#define fa(a) ((a)>>1)
#define ll long long
#define pub push_back
#define pob pop_back
#define pof pop_front
#define puf push_front
const int N=1e5+1;
struct ss{
    int x,y;
    ll dis;
}s[N];
int n;
bool cmp(ss a,ss b);
int main()
{
    int i,z;
    ll a,b;
    scanf("%d",&n);
    for(z=0,i=1;i<=n;i++){
        scanf("%d%d",&s[i].x,&s[i].y);
        a=s[i].x;
        b=s[i].y;
        if(s[i].x==0||s[i].y==0)
            z++;
        s[i].dis=a*a+b*b;
    }
    sort(s+1,s+n,cmp);
    printf("%d\n",6*n-2*z);
    for(i=1;i<=n;i++){
        if(s[i].x!=0){
            if(s[i].x>0){
                printf("1 %d R\n",s[i].x);
            }
            else{
                printf("1 %d L\n",-s[i].x);
            }
        }
        if(s[i].y!=0){
            if(s[i].y>0){
                printf("1 %d U\n",s[i].y);
            }
            else{
                printf("1 %d D\n",-s[i].y);
            }
        }
        printf("2\n");
        if(s[i].x!=0){
            if(s[i].x>0){
                printf("1 %d L\n",s[i].x);
            }
            else{
                printf("1 %d R\n",-s[i].x);
            }
        }
        if(s[i].y!=0){
            if(s[i].y>0){
                printf("1 %d D\n",s[i].y);
            }
            else{
                printf("1 %d U\n",-s[i].y);
            }
        }
        printf("3\n");
    }
}
bool cmp(ss a,ss b)
{
    return a.dis<b.dis;
}


#include<cstdio>
#include<iostream>
#include<cstring>
#include<cstdlib>
#include <cmath>
#include <algorithm>
#include<deque>
using namespace std;
#define ls(a) ((a)<<1)
#define rs(a) (((a)<<1)+1)
#define fa(a) ((a)>>1)
#define ll long long
#define pub push_back
#define pob pop_back
#define pof pop_front
#define puf push_front
const int N=1e2+1;
struct ss{
    int x,y;
    ll dis;
}s[N];
int n;
bool cmp(ss a,ss b);
int main()
{
    int i,z;
    ll a,b;
    scanf("%d",&n);
    for(z=0,i=1;i<=n;i++){
        scanf("%d%d",&s[i].x,&s[i].y);
        a=s[i].x;
        b=s[i].y;
        if(s[i].x==0||s[i].y==0)
            z++;
        s[i].dis=a*a+b*b;
    }
    sort(s+1,s+n+1,cmp);
    printf("%d\n",6*n-2*z);
    for(i=1;i<=n;i++){
        if(s[i].x!=0){
            if(s[i].x>0){
                printf("1 %d R\n",s[i].x);
            }
            else{
                printf("1 %d L\n",-s[i].x);
            }
        }
        if(s[i].y!=0){
            if(s[i].y>0){
                printf("1 %d U\n",s[i].y);
            }
            else{
                printf("1 %d D\n",-s[i].y);
            }
        }
        printf("2\n");
        if(s[i].x!=0){
            if(s[i].x>0){
                printf("1 %d L\n",s[i].x);
            }
            else{
                printf("1 %d R\n",-s[i].x);
            }
        }
        if(s[i].y!=0){
            if(s[i].y>0){
                printf("1 %d D\n",s[i].y);
            }
            else{
                printf("1 %d U\n",-s[i].y);
            }
        }
        printf("3\n");
    }
}
bool cmp(ss a,ss b)
{
    return a.dis<b.dis;
}


//http://codeforces.com/problemset/problem/350/C

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <list>

using namespace std;

#define pii pair <int, int>
#define pll pair <long long, long long>
#define vi vector <int>
#define ll long long
#define mp make_pair
#define fir first
#define sec second

int n;
int curX = 0, curY = 0;
int result = 0;
vector <pii> bombs(0);

bool cmp(pii a, pii b);
void moveTo(int x, int y);

int main()
{
	int ii;

	ios::sync_with_stdio(false);

	cin >> n;

	bombs.resize(n);

	for (ii = 0; ii < n; ii++)
		cin >> bombs[ii].fir >> bombs[ii].sec;

	sort(bombs.begin(), bombs.end(), cmp);

	result = 2 * n;

	for (ii = 0; ii < n; ii++)
	{
		if (bombs[ii].first != 0)
			result += 2;

		if (bombs[ii].second != 0)
			result += 2;
	}

	cout << result << endl;

	for (ii = 0; ii < n; ii++)
	{
		moveTo(bombs[ii].fir, bombs[ii].sec);

		cout << "2" << endl;

		moveTo(0, 0);

		cout << "3" << endl;
	}

	return 0;
}

bool cmp(pii a, pii b)
{
	if (a.fir < b.fir)
		return 1;
	else if (a.fir > b.fir)
		return 0;
	else
		return (a.sec < b.sec);
}

void moveTo(int x, int y)
{

	if (x > curX)
		cout << "1 " << abs(curX - x) << " R" << endl;
	else if (x < curX)
		cout << "1 " << abs(curX - x) << " L" << endl;

	if (y > curY)
		cout << "1 " << abs(curY - y) << " U" << endl;
	else if (y < curY)
		cout << "1 " << abs(curY - y) << " D" << endl;

	curX = x;
	curY = y;
}


//http://codeforces.com/problemset/problem/350/C

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <list>

using namespace std;

#define pii pair <int, int>
#define pll pair <long long, long long>
#define vi vector <int>
#define ll long long
#define mp make_pair
#define fir first
#define sec second

int n;
int curX = 0, curY = 0;
int result = 0;
vector <pii> bombs(0);

bool cmp(pii a, pii b);
void moveTo(int x, int y);

int main()
{
	int ii;

	ios::sync_with_stdio(false);

	cin >> n;

	bombs.resize(n);

	for (ii = 0; ii < n; ii++)
		cin >> bombs[ii].fir >> bombs[ii].sec;

	sort(bombs.begin(), bombs.end(), cmp);

	result = 2 * n;

	for (ii = 0; ii < n; ii++)
	{
		if (bombs[ii].first != 0)
			result += 2;

		if (bombs[ii].second != 0)
			result += 2;
	}

	cout << result << endl;

	for (ii = 0; ii < n; ii++)
	{
		moveTo(bombs[ii].fir, bombs[ii].sec);

		printf("2\n");

		moveTo(0, 0);

		printf("3\n");
	}

	return 0;
}

bool cmp(pii a, pii b)
{
	return ((a.first + a.second) < (b.first + b.second));
}

void moveTo(int x, int y)
{
	if (x > curX)
		printf("1 %d R\n", abs(curX - x));
	else if (x < curX)
		printf("1 %d L\n", abs(curX - x));

	if (y > curY)
		printf("1 %d U\n", abs(curY - y));
	else if (y < curY)
		printf("1 %d D\n", abs(curY - y));

	curX = x;
	curY = y;
}


//http://codeforces.com/problemset/problem/350/C

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <list>

using namespace std;

#define pii pair <int, int>
#define pll pair <long long, long long>
#define vi vector <int>
#define ll long long
#define mp make_pair
#define fir first
#define sec second

int n;
int curX = 0, curY = 0;
vector <pii> bombs(0);

bool cmp(pii a, pii b);
void moveTo(int x, int y);

int main()
{
	int ii;

	ios::sync_with_stdio(false);

	cin >> n;

	bombs.resize(n);

	for (ii = 0; ii < n; ii++)
		cin >> bombs[ii].fir >> bombs[ii].sec;

	sort(bombs.begin(), bombs.end(), cmp);

	cout << (6 * n) << endl;

	for (ii = 0; ii < n; ii++)
	{
		moveTo(bombs[ii].fir, bombs[ii].sec);

		cout << "2" << endl;

		moveTo(0, 0);

		cout << "3" << endl;
	}

	return 0;
}

bool cmp(pii a, pii b)
{
	if (a.fir < b.fir)
		return 1;
	else if (a.fir > b.fir)
		return 0;
	else
		return (a.sec < b.sec);
}

void moveTo(int x, int y)
{
	cout << "1 " << abs(curX - x) << " ";

	if (x > curX)
		cout << "R" << endl;
	else
		cout << "L" << endl;

	cout << "1 " << abs(curY - y) << " ";

	if (y > curY)
		cout << "U" << endl;
	else
		cout << "D" << endl;

	curX = x;
	curY = y;
}


//http://codeforces.com/problemset/problem/350/C

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <list>

using namespace std;

#define pii pair <int, int>
#define pll pair <long long, long long>
#define vi vector <int>
#define ll long long
#define mp make_pair
#define fir first
#define sec second

int n;
int curX = 0, curY = 0;
int result = 0;
vector <pii> bombs(0);

bool cmp(pii a, pii b);
void moveTo(int x, int y);

int main()
{
	int ii;

	ios::sync_with_stdio(false);

	cin >> n;

	bombs.resize(n);

	for (ii = 0; ii < n; ii++)
		cin >> bombs[ii].fir >> bombs[ii].sec;

	sort(bombs.begin(), bombs.end(), cmp);

	result = 2 * n;

	for (ii = 0; ii < n; ii++)
	{
		if (bombs[ii].first != 0)
			result += 2;

		if (bombs[ii].second != 0)
			result += 2;
	}

	cout << result << endl;

	for (ii = 0; ii < n; ii++)
	{
		moveTo(bombs[ii].fir, bombs[ii].sec);

		printf("2\n");

		moveTo(0, 0);

		printf("3\n");
	}

	return 0;
}

bool cmp(pii a, pii b)
{
	int sum1, sum2;

	sum1 = abs(a.first) + abs(a.second);
	sum2 = abs(b.first) + abs(b.second);

	return (sum1 < sum2);
}

void moveTo(int x, int y)
{
	if (x > curX)
		printf("1 %d R\n", abs(curX - x));
	else if (x < curX)
		printf("1 %d L\n", abs(curX - x));

	if (y > curY)
		printf("1 %d U\n", abs(curY - y));
	else if (y < curY)
		printf("1 %d D\n", abs(curY - y));

	curX = x;
	curY = y;
}


//http://codeforces.com/problemset/problem/350/C

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <list>

using namespace std;

#define pii pair <int, int>
#define pll pair <long long, long long>
#define vi vector <int>
#define ll long long
#define mp make_pair
#define fir first
#define sec second

int n;
int curX = 0, curY = 0;
int result = 0;
vector <pii> bombs(0);

bool cmp(pii a, pii b);
void moveTo(int x, int y);

int main()
{
	int ii;

	ios::sync_with_stdio(false);

	cin >> n;

	bombs.resize(n);

	for (ii = 0; ii < n; ii++)
		cin >> bombs[ii].fir >> bombs[ii].sec;

	sort(bombs.begin(), bombs.end(), cmp);

	result = 2 * n;

	for (ii = 0; ii < n; ii++)
	{
		if (bombs[ii].first != 0)
			result += 2;

		if (bombs[ii].second != 0)
			result += 2;
	}

	cout << result << endl;

	for (ii = 0; ii < n; ii++)
	{
		moveTo(bombs[ii].fir, bombs[ii].sec);

		printf("2\n");

		moveTo(0, 0);

		printf("3\n");
	}

	return 0;
}

bool cmp(pii a, pii b)
{
	if (a.fir < b.fir)
		return 1;
	else if (a.fir > b.fir)
		return 0;
	else
		return (a.sec < b.sec);
}

void moveTo(int x, int y)
{
	if (x > curX)
		printf("1 %d R\n", abs(curX - x));
	else if (x < curX)
		printf("1 %d L\n", abs(curX - x));

	if (y > curY)
		printf("1 %d U\n", abs(curY - y));
	else if (y < curY)
		printf("1 %d D\n", abs(curY - y));

	curX = x;
	curY = y;
}


# include <iostream>
# include <cmath>
# include <algorithm>
# include <stdio.h>
using namespace std;

long long abss(long long x)
{
	if (x < 0)
		return -x;
	return x;
}

struct cell
{
	long long x,y;
	cell()
	{x = 0;	y = 0;}

	cell(long long xx,long long yy)
	{x = xx;	y = yy;}

	long long dist_from_origin()
	{return abss(x) + abss(y);}
};

cell point[100005];

bool com(cell a,cell b)
{
	return (a.dist_from_origin() < b.dist_from_origin());
}

int main()
{

	int n;	cin>>n;
	long long operations = 0;
	for(int i=0;i<n;i++)
	{
		cin>>point[i].y>>point[i].x;
		operations += ( 2*(point[i].x != 0) + 2*(point[i].y != 0) );
	}
	operations += 2*n;
	sort(point,point+n,com);

	cout<<operations<<endl;
	for (int i=0;i<n;i++)
	{
		long long x,y;
		x = point[i].x;
		y = point[i].y;

		if (x > 0)
			printf("1 %I64d U\n",x);
		if (x < 0)
			printf("1 %I64d D\n",abss(x));
		if (y > 0)
			printf("1 %I64d R\n",y);
		if (y < 0)
			printf("1 %I64d L\n",abss(y));

		cout<<2<<endl;

		if (x > 0)
			printf("1 %I64d D\n",x);
		if (x < 0)
			printf("1 %I64d U\n",abss(x));
		if (y > 0)
			printf("1 %I64d L\n",y);
		if (y < 0)
			printf("1 %I64d R\n",abss(y));

		cout<<3<<endl;
	}

	return 0;
}


# include <iostream>
# include <cmath>
# include <algorithm>
using namespace std;

long long abss(long long x)
{
	if (x < 0)
		return -x;
	return x;
}

struct cell
{
	long long x,y;
	cell()
	{x = 0;	y = 0;}

	cell(long long xx,long long yy)
	{x = xx;	y = yy;}

	long long dist_from_origin()
	{return abss(x) + abss(y);}
};

cell point[100005];

bool com(cell a,cell b)
{
	return (a.dist_from_origin() < b.dist_from_origin());
}

int main()
{

	int n;	cin>>n;
	long long operations = 0;
	for(int i=0;i<n;i++)
	{
		cin>>point[i].y>>point[i].x;
		operations += ( 2*(point[i].x != 0) + 2*(point[i].y != 0) );
	}
	operations += 2*n;
	sort(point,point+n,com);

	cout<<operations<<endl;
	for (int i=0;i<n;i++)
	{
		long long x,y;
		x = point[i].x;
		y = point[i].y;

		if (x > 0)
			cout<<"1 "<<x<<" U"<<endl;
		if (x < 0)
			cout<<"1 "<<abss(x)<<" D"<<endl;
		if (y > 0)
			cout<<"1 "<<y<<" R"<<endl;
		if (y < 0)
			cout<<"1 "<<abss(y)<<" L"<<endl;

		cout<<2<<endl;

		if (x > 0)
			cout<<"1 "<<x<<" D"<<endl;
		if (x < 0)
			cout<<"1 "<<abss(x)<<" U"<<endl;
		if (y > 0)
			cout<<"1 "<<y<<" L"<<endl;
		if (y < 0)
			cout<<"1 "<<abss(y)<<" R"<<endl;

		cout<<3<<endl;
	}

	return 0;
}


#include <fstream>
#include <iostream>
#include <math.h>
#include <cstdlib>
#include <algorithm>
using namespace std;

#define fi(a,b,c) for( int (a) = b; (a) < (c); (a)++)
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

const int MOD = 1000000007;

int n=5;
int x[100003], y[100003], a[100003];
int bx[100003];
char r[1000005];
int rd[1000005];
int rn=0;

int comp(int a, int b)
{
  return (x[a] < x[b]) || (x[a] == x[b] && abs(y[a]) < abs(y[b]));
}

int comp2(int a, int b)
{
  return abs(a) < abs(b);
}

int main(){
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	scanf("%d",&n);

	int j = 0, k = 0;
	fi(i,0,n){
		scanf("%d%d", &x[j], &y[j]);
		if(y[j] ==0)
		{
			bx[k] = x[j];
			k++;
		}
		else{
			a[j] = j;
			j++;

		}
	}
	sort(a,a+j,comp);
	sort(bx, bx + k, comp2);

	fi(i, 0, k){
		int xx = bx[i];

		if(xx < 0){
			r[rn] = 1; }
		else{
			r[rn] = 3; }
		rd[rn] = abs(xx);
		rn++;

		r[rn] = 5; rn++;

		if(xx < 0){
			r[rn] = 3; }
		else{
			r[rn] = 1; }
		rd[rn] = abs(xx);
		rn++;

		r[rn] = 6; rn++;
	}

	fi(i,0,j){
		int xx = x[a[i]], yy = y[a[i]];

		if(xx < 0){
			r[rn] = 1; }
		else{
			r[rn] = 3; }
		rd[rn] = abs(xx);
		rn++;

		if(yy < 0){
			r[rn] = 2; }
		else{
			r[rn] = 4; }
		rd[rn] = abs(yy);
		rn++;

		r[rn] = 5; rn++;

		if(yy < 0){
			r[rn] = 4; }
		else{
			r[rn] = 2; }
		rd[rn] = abs(yy);
		rn++;

		if(xx < 0){
			r[rn] = 3; }
		else{
			r[rn] = 1; }
		rd[rn] = abs(xx);
		rn++;

		r[rn] = 6; rn++;
	}

	printf("%d\n", rn);
	fi(i,0,rn){
		if(r[i] == 1)
			printf("1 %d L\n", rd[i]);
		else if(r[i] == 2)
			printf("1 %d D\n", rd[i]);
		else if(r[i] == 3)
			printf("1 %d R\n", rd[i]);
		else if(r[i] == 4)
			printf("1 %d U\n", rd[i]);
		else if(r[i] == 5)
			printf("2\n");
		else if(r[i] == 6)
			printf("3\n");}

	return 0;
}


#include <fstream>
#include <iostream>
#include <math.h>
#include <cstdlib>
#include <algorithm>
using namespace std;

#define fi(a,b,c) for( int (a) = b; (a) < (c); (a)++)
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

const int MOD = 1000000007;

int n=5;
int x[100003], y[100003], a[100003];
int bx[100003];
char r[1000005];
int rd[1000005];
int rn=0;

int comp(int a, int b)
{
  return (x[a] < x[b]) || (x[a] == x[b] && abs(y[a]) < abs(y[b]));
}

int comp2(int a, int b)
{
  return abs(a) < abs(b);
}

int main(){
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	scanf("%d",&n);

	int j = 0, k = 0;
	fi(i,0,n){
		scanf("%d%d", &x[j], &y[j]);
		if(y[j] ==0)
		{
			bx[k] = x[j];
			k++;
		}
		else{
			a[j] = j;
			j++;

		}
	}
	sort(a,a+j,comp);
	sort(bx, bx + k, comp2);

	fi(i, 0, k){
		int xx = bx[i];

		if(xx < 0){
			r[rn] = 1; }
		else{
			r[rn] = 3; }
		rd[rn] = abs(xx);
		rn++;

		r[rn] = 5; rn++;

		if(xx < 0){
			r[rn] = 3; }
		else{
			r[rn] = 1; }
		rd[rn] = abs(xx);
		rn++;

		r[rn] = 6; rn++;
	}

	fi(i,0,j){
		int xx = x[a[i]], yy = y[a[i]];

		if(xx < 0){
			r[rn] = 1; }
		else{
			r[rn] = 3; }
		rd[rn] = abs(xx);
		rn++;
		if(xx == 0) rn--;

		if(yy < 0){
			r[rn] = 2; }
		else{
			r[rn] = 4; }
		rd[rn] = abs(yy);
		rn++;

		r[rn] = 5; rn++;

		if(yy < 0){
			r[rn] = 4; }
		else{
			r[rn] = 2; }
		rd[rn] = abs(yy);
		rn++;

		if(xx < 0){
			r[rn] = 3; }
		else{
			r[rn] = 1; }
		rd[rn] = abs(xx);
		rn++;
		if(xx == 0) rn--;

		r[rn] = 6; rn++;
	}

	printf("%d\n", rn);
	fi(i,0,rn){
		if(r[i] == 1)
			printf("1 %d L\n", rd[i]);
		else if(r[i] == 2)
			printf("1 %d D\n", rd[i]);
		else if(r[i] == 3)
			printf("1 %d R\n", rd[i]);
		else if(r[i] == 4)
			printf("1 %d U\n", rd[i]);
		else if(r[i] == 5)
			printf("2\n");
		else if(r[i] == 6)
			printf("3\n");}

	return 0;
}


#include <fstream>
#include <iostream>
#include <math.h>
#include <cstdlib>
using namespace std;

#define fi(a,b,c) for( int (a) = b; (a) < (c); (a)++)
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

const int MOD = 1000000007;

int main(){
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");

	char s[11];
	fi(i,0,10)
		cin>>s[i+1];
	int m;
	cin>>m;

	int a[1005];
	fi(i,1,11)
	{
		if(s[i] == '0') continue;
		bool cont = false;
		a[0] = i;
		int dif = a[0];
		int last = a[0];
		fi(i,1,m){
			int begin = abs(dif)*2;
			if(begin > 10)
				begin = 10;
			bool ok = false;
			for(int j = begin; j > abs(dif); j--)
				if(j != last && s[j] == '1')
				{
					a[i] = j;
					last =j;
					if(dif > 0) dif -= j; else dif+=j;
					if(i == 0) dif = j;
					ok = true;
					break;
				}
			if(ok) continue;
			fi(j,begin+1, 11)
				if(j != last && s[j] == '1')
					{
					a[i] = j;
					last = j;
					if(dif > 0) dif -= j; else dif+=j;
					if(i == 0) dif = j;
					ok = true;
					break;
				}
			if(!ok)
			{
				cont = true;
				break;
			}
		}
		if(cont) continue;
		cout<<"YES"<<endl;
		fi(i,0,m)
			cout<<a[i]<<" ";
		return 0;
	}
	cout<<"NO"<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	cin >> n;
	vector<Bomb> bombs(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs[i] = bomb;
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	cout << k << endl;
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

class Bomb {
public:
    int x, y, dist;
    Bomb(int x, int y);

    bool operator < (const Bomb &bomb) const{
        return dist > bomb.dist;
    }
    ~Bomb();
private:
};

Bomb::Bomb(int x, int y) {
    this->x = x;
    this->y = y;
    dist = abs(x) + abs(y);
}

Bomb::~Bomb() {
}

int _tmain(int argc, _TCHAR* argv[]) {
    int n, x, y;
    cin >> n;
    vector<Bomb*> bombs;
    int k = 0;
    for (int i = 0; i < n; i++) {
        cin >> x;
        cin >> y;
        bombs.push_back(new Bomb(x, y));
        k += 2;
        k += x == 0 ? 0 : 2;
        k += y == 0 ? 0 : 2;
    }
    sort(bombs.begin(), bombs.end());

    cout << k << endl;
    vector<Bomb*>::iterator it;
    for (it = bombs.begin() ; it != bombs.end(); ++it) {
        Bomb* bomb = *it;
        if (bomb->x != 0) {
            cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
        }
        if (bomb->y != 0) {
            cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
        }
        cout << 2 << endl;
        if (bomb->x != 0) {
            cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
        }
        if (bomb->y != 0) {
            cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
        }
        cout << 3 << endl;
    }

    return 0;
}


#include "stdafx.h"

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	cin >> n;
	vector<Bomb> bombs(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs[i] = bomb;
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	cout << k << endl;
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

class Bomb {
public:
	int x, y, dist;
	Bomb(int x, int y);

	bool operator < (const Bomb &bomb) const{
		return dist > bomb.dist;
	}
	~Bomb();
private:
};

Bomb::Bomb(int x, int y) {
	this->x = x;
	this->y = y;
	dist = abs(x) + abs(y);
}

Bomb::~Bomb() {
}

int main() {
	int n, x, y;
	cin >> n;
	vector<Bomb*> bombs;
	bombs.reserve(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		bombs.push_back(new Bomb(x, y));
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end());

	cout << k << endl;
	vector<Bomb*>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it)->x;
		y = (*it)->y;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

class Bomb {
public:
	int x, y, dist;
	Bomb(int x, int y);

	bool operator < (const Bomb &bomb) const{
		return dist > bomb.dist;
	}
	~Bomb();
private:
};

Bomb::Bomb(int x, int y) {
	this->x = x;
	this->y = y;
	dist = abs(x) + abs(y);
}

Bomb::~Bomb() {
}

int main() {
	int n, x, y;
	cin >> n;
	vector<Bomb*> bombs;
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		bombs.push_back(new Bomb(x, y));
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end());

	cout << k << endl;
	vector<Bomb*>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		Bomb* bomb = *it;
		if (bomb->x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (bomb->y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (bomb->x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (bomb->y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	scanf_s("%d", &n);
	vector<Bomb> bombs;
	bombs.reserve(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		scanf_s("%d%d", &x, &y);
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs.push_back(bomb);
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	printf("%d\n",k);
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;

		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'L' : 'R');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'D' : 'U');
		}
		printf("2\n");
		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'R' : 'L');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'U' : 'D');
		}
		printf("3\n");
	}

	return 0;
}


#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	scanf_s("%d", &n);
	vector<Bomb> bombs;
	bombs.reserve(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		scanf_s("%d", &x, &y);
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs.push_back(bomb);
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	printf("%d\n",k);
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;

		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'L' : 'R');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'D' : 'U');
		}
		printf("2\n");
		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'R' : 'L');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'U' : 'D');
		}
		printf("3\n");
	}

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

class Bomb {
public:
	int x, y, dist;
	Bomb(int x, int y);

	bool operator < (const Bomb &bomb) const{
		return dist > bomb.dist;
	}
	~Bomb();
private:
};

Bomb::Bomb(int x, int y) {
	this->x = x;
	this->y = y;
	dist = abs(x) + abs(y);
}

Bomb::~Bomb() {
}

int main() {
	int n, x, y;
	cin >> n;
	vector<Bomb*> bombs;
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		bombs.push_back(new Bomb(x, y));
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end());

	cout << k << endl;
	vector<Bomb*>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it)->x;
		y = (*it)->y;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	scanf_s("%d", &n);
	vector<Bomb> bombs;
	bombs.reserve(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		scanf_s("%d%d", &x, &y);
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs.push_back(bomb);
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	printf("%d\n",k);
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;

		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'L' : 'R');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'D' : 'U');
		}
		printf("2\n");
		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'R' : 'L');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'U' : 'D');
		}
		printf("3");
	}

	return 0;
}


#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	scanf_s("%d", &n);
	vector<Bomb> bombs;
	bombs.reserve(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		scanf_s("%d", &x, &y);
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs.push_back(bomb);
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	printf("%d\n",k);
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;

		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'L' : 'R');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(x), y < 0 ? 'D' : 'U');
		}
		printf("2\n");
		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'R' : 'L');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(x), y < 0 ? 'U' : 'D');
		}
		printf("3\n");
	}

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

class Bomb {
public:
	int x, y, dist;
	Bomb(int x, int y);

	bool operator < (const Bomb &bomb) const{
		return dist > bomb.dist;
	}
	~Bomb();
private:
};

Bomb::Bomb(int x, int y) {
	this->x = x;
	this->y = y;
	dist = abs(x) + abs(y);
}

Bomb::~Bomb() {
}

int _tmain() {
	int n, x, y;
	cin >> n;
	vector<Bomb*> bombs;
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		bombs.push_back(new Bomb(x, y));
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end());

	cout << k << endl;
	vector<Bomb*>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		Bomb* bomb = *it;
		if (bomb->x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (bomb->y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (bomb->x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (bomb->y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <iostream>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	cin >> n;
	Bomb* bombs = new Bomb[n];
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs[i] = bomb;
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs, bombs + n, cmp);

	cout << k << endl;
	for (int i = 0; i < n; i++) {
		x = bombs[i].x;
		y = bombs[i].y;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	scanf_s("%d", &n);
	vector<Bomb> bombs;
	bombs.reserve(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		scanf_s("%d", &x, &y);
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs.push_back(bomb);
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	printf("%d\n",k);
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;

		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'L' : 'R');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'D' : 'U');
		}
		printf("2\n");
		if (x != 0) {
			printf("1 %d %c\n", abs(x), x < 0 ? 'R' : 'L');
		}
		if (y != 0) {
			printf("1 %d %c\n", abs(y), y < 0 ? 'U' : 'D');
		}
		printf("3");
	}

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct Bomb {
	int x, y, dist;
};

int cmp(Bomb b1, Bomb b2) {
	return b1.dist < b2.dist;
}

int main() {
	int n, x, y;
	cin >> n;
	vector<Bomb> bombs;
	bombs.reserve(n);
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> x;
		cin >> y;
		Bomb bomb;
		bomb.x = x; bomb.y = y; bomb.dist = abs(x) + abs(y);
		bombs.push_back(bomb);
		k += 2;
		k += x == 0 ? 0 : 2;
		k += y == 0 ? 0 : 2;
	}
	sort(bombs.begin(), bombs.end(), cmp);

	cout << k << endl;
	vector<Bomb>::iterator it;
	for (it = bombs.begin() ; it != bombs.end(); ++it) {
		x = (*it).x;
		y = (*it).y;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'L' : 'R') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'D' : 'U') << endl;
		}
		cout << 2 << endl;
		if (x != 0) {
			cout << 1 << ' ' << abs(x) << ' ' << (x < 0 ? 'R' : 'L') << endl;
		}
		if (y != 0) {
			cout << 1 << ' ' << abs(y) << ' ' << (y < 0 ? 'U' : 'D') << endl;
		}
		cout << 3 << endl;
	}

	return 0;
}


#include <algorithm>
#include <iostream>
#include <map>
#include <utility>
#include <cmath>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
class dato{
   public:
	  int x,y;
};
bool operator < (dato a, dato b){
	return (abs(a.x)+abs(a.y)<abs(b.x)+abs(b.y));
}

int n,i,j,k,r,sx,sy;
dato a[100010];
int main(){
    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&a[i].x,&a[i].y);
		if (a[i].x==0 || a[i].y==0)
			r=r+4;
		else
			r=r+6;
	}
	sort(a,a+n);
	printf("%d\n",r);
    for(i=0;i<n;i++){
       if (a[i].x<0)
	      printf("1 %d L\n",-a[i].x);
	   else
        if (a[i].x>0)
	      printf("1 %d R\n",a[i].x);
	   if (a[i].y<0)
	      printf("1 %d D\n",-a[i].y);
	   else
        if (a[i].y>0)
	      printf("1 %d U\n",a[i].y);
	   printf("2\n");
	   if (a[i].x<0)
	      printf("1 %d R\n",-a[i].x);
	   else
        if (a[i].x>0)
	      printf("1 %d L\n",a[i].x);
	   if (a[i].y<0)
	      printf("1 %d U\n",-a[i].y);
	   else
        if (a[i].y>0)
	      printf("1 %d D\n",a[i].y);
       printf("3\n");
	}
}


#include <algorithm>
#include <iostream>
#include <map>
#include <utility>
#include <cmath>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
class dato{
   public:
	  int x,y;
};
bool operator < (dato a, dato b){
	return (abs(a.x)+abs(a.y)<abs(b.x)+abs(b.y));
}

int n,i,j,k,r,sx,sy;
dato a[100010];
int main(){
    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d",&a[i].x,&a[i].y);
		if (a[i].x==0 || a[i].y==0)
			r=r+4;
		else
			r=r+6;
	}
	sort(a,a+n);
	printf("%d\n",r);
    for(i=0;i<n;i++){
       if (a[i].x<0)
	      printf("1 %d L\n",-a[i].x);
	   else
        if (a[i].x>0)
	      printf("1 %d R\n",a[i].x);
	   if (a[i].y<0)
	      printf("1 %d D\n",-a[i].y);
	   else
        if (a[i].x>0)
	      printf("1 %d U\n",a[i].y);
	   printf("2\n");
	   if (a[i].x<0)
	      printf("1 %d R\n",-a[i].x);
	   else
        if (a[i].x>0)
	      printf("1 %d L\n",a[i].x);
	   if (a[i].y<0)
	      printf("1 %d U\n",-a[i].y);
	   else
        if (a[i].x>0)
	      printf("1 %d D\n",a[i].y);
       printf("3\n");
	}
}


#pragma warning (disable : 4996)

#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
#include <stack>
#include <algorithm>
#include <ios>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <queue>
#include <set>
#include <functional>
#include <cmath>
#include <sstream>
#include <map>
#include <memory.h>
#include <stdio.h>
#include <cassert>
#include <string.h>
#include <deque>

#define forn(i , n) for (int i = 0; i < n; ++i)
#define down(i, n) for (int i = n - 1; i >= 0; --i)

using namespace std;

typedef unsigned long long int u64;
typedef long long int i64;
typedef vector<int> vint;
typedef vector<i64> vi64;
typedef pair<int, int> pint;
typedef pair<i64, i64> pi64;

#define FILE_NAME "file"
#define CONTEST "seq"
#define M_PI 3.14159265358979323846

double sqr(double a)
{
    return a * a;
}

const i64 inf = 100000000000000000LL;

struct cmp
{
    bool operator()(const pi64 & a, const pi64 & b) const
    {
        if (abs(a.first) != abs(b.first))
        {
            return abs(a.first) < abs(b.first);
        }
        return abs(a.second) < abs(b.second);

    }
};

vector<string> ans;

void solve(pi64 p)
{
    if (p.first)
    {
        if (p.first > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.first;
            s << " ";
            s << "R";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.first;
            s << " ";
            s << "L";
            ans.push_back(s.str());
        }

    }
    if (p.second)
    {
        if (p.second > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.second;
            s << " ";
            s << "U";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.second;
            s << " ";
            s << "D";
            ans.push_back(s.str());
        }
    }
    string s;
    s += "2";
    ans.push_back(s);
    if (p.first)
    {
        if (p.first > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.first;
            s << " ";
            s << "L";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.first;
            s << " ";
            s << "R";
            ans.push_back(s.str());
        }

    }
    if (p.second)
    {
        if (p.second > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.second;
            s << " ";
            s << "U";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.second;
            s << " ";
            s << "D";
            ans.push_back(s.str());
        }
    }
    ans.push_back("3");

}

int main()
{
    clock_t start = clock();
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed << setprecision(15);
#ifdef FILE_INPUT
    freopen(FILE_NAME ".in", "r", stdin);
    freopen(FILE_NAME ".out", "w", stdout);
#endif
    int n;
    cin >> n;
    vector<pi64> arr;
    forn(i, n)
    {
        pi64 p;
        cin >> p.first >> p.second;
        arr.push_back(p);
    }
    sort(arr.begin(), arr.end(), cmp());

    forn(i, n)
    {
        solve(arr[i]);
    }
    cout << ans.size() << "\n";
    forn(i, ans.size())
    {
        cout << ans[i] << "\n";
    }

    return 0;
}


#pragma warning (disable : 4996)

#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
#include <stack>
#include <algorithm>
#include <ios>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <queue>
#include <set>
#include <functional>
#include <cmath>
#include <sstream>
#include <map>
#include <memory.h>
#include <stdio.h>
#include <cassert>
#include <string.h>
#include <deque>

#define forn(i , n) for (int i = 0; i < n; ++i)
#define down(i, n) for (int i = n - 1; i >= 0; --i)

using namespace std;

typedef unsigned long long int u64;
typedef long long int i64;
typedef vector<int> vint;
typedef vector<i64> vi64;
typedef pair<int, int> pint;
typedef pair<i64, i64> pi64;

#define FILE_NAME "file"
#define CONTEST "seq"
#define M_PI 3.14159265358979323846

double sqr(double a)
{
    return a * a;
}

const i64 inf = 100000000000000000LL;

struct cmp
{
    bool operator()(const pi64 & a, const pi64 & b) const
    {
        if (abs(a.first) != abs(b.first))
        {
            return abs(a.first) < abs(b.first);
        }
        return abs(a.second) < abs(b.second);

    }
};

vector<string> ans;

void solve(pi64 p)
{
    if (p.first)
    {
        if (p.first > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.first;
            s << " ";
            s << "R";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.first;
            s << " ";
            s << "L";
            ans.push_back(s.str());
        }

    }
    if (p.second)
    {
        if (p.second > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.second;
            s << " ";
            s << "U";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.second;
            s << " ";
            s << "D";
            ans.push_back(s.str());
        }
    }
    string s;
    s += "2";
    ans.push_back(s);
    if (p.first)
    {
        if (p.first > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.first;
            s << " ";
            s << "L";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.first;
            s << " ";
            s << "R";
            ans.push_back(s.str());
        }

    }
    if (p.second)
    {
        if (p.second > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.second;
            s << " ";
            s << "D";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.second;
            s << " ";
            s << "U";
            ans.push_back(s.str());
        }
    }
    ans.push_back("3");

}

int main()
{
    clock_t start = clock();
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed << setprecision(15);
#ifdef FILE_INPUT
    freopen(FILE_NAME ".in", "r", stdin);
    freopen(FILE_NAME ".out", "w", stdout);
#endif
    int n;
    cin >> n;
    vector<pi64> arr;
    forn(i, n)
    {
        pi64 p;
        cin >> p.first >> p.second;
        arr.push_back(p);
    }
    sort(arr.begin(), arr.end(), cmp());

    forn(i, n)
    {
        solve(arr[i]);
    }
    cout << ans.size() << "\n";
    forn(i, ans.size())
    {
        cout << ans[i] << "\n";
    }

    return 0;
}


#pragma warning (disable : 4996)

#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <assert.h>
#include <stack>
#include <algorithm>
#include <ios>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <queue>
#include <set>
#include <functional>
#include <cmath>
#include <sstream>
#include <map>
#include <memory.h>
#include <stdio.h>
#include <cassert>
#include <string.h>
#include <deque>

#define forn(i , n) for (int i = 0; i < n; ++i)
#define down(i, n) for (int i = n - 1; i >= 0; --i)

using namespace std;

typedef unsigned long long int u64;
typedef long long int i64;
typedef vector<int> vint;
typedef vector<i64> vi64;
typedef pair<int, int> pint;
typedef pair<i64, i64> pi64;

#define FILE_NAME "file"
#define CONTEST "seq"
#define M_PI 3.14159265358979323846

double sqr(double a)
{
    return a * a;
}

const i64 inf = 100000000000000000LL;

struct cmp
{
    bool operator()(const pi64 & a, const pi64 & b) const
    {
        if (abs(a.first) != abs(b.first))
        {
            return abs(a.first) < abs(b.first);
        }
        return abs(a.second) < abs(b.second);

    }
};

vector<string> ans;

void solve(pi64 p)
{
    if (p.first)
    {
        if (p.first > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.first;
            s << " ";
            s << "R";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.first;
            s << " ";
            s << "L";
            ans.push_back(s.str());
        }

    }
    if (p.second)
    {
        if (p.second > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.second;
            s << " ";
            s << "T";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.second;
            s << " ";
            s << "D";
            ans.push_back(s.str());
        }
    }
    string s;
    s += "2";
    ans.push_back(s);
    if (p.first)
    {
        if (p.first > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.first;
            s << " ";
            s << "L";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.first;
            s << " ";
            s << "R";
            ans.push_back(s.str());
        }

    }
    if (p.second)
    {
        if (p.second > 0)
        {
            stringstream s;
            s << "1 ";
            s << p.second;
            s << " ";
            s << "D";
            ans.push_back(s.str());
        }
        else
        {
            stringstream s;
            s << "1 ";
            s << -p.second;
            s << " ";
            s << "R";
            ans.push_back(s.str());
        }
    }
    ans.push_back("3");

}

int main()
{
    clock_t start = clock();
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed << setprecision(15);
#ifdef FILE_INPUT
    freopen(FILE_NAME ".in", "r", stdin);
    freopen(FILE_NAME ".out", "w", stdout);
#endif
    int n;
    cin >> n;
    vector<pi64> arr;
    forn(i, n)
    {
        pi64 p;
        cin >> p.first >> p.second;
        arr.push_back(p);
    }
    sort(arr.begin(), arr.end(), cmp());

    forn(i, n)
    {
        solve(arr[i]);
    }
    cout << ans.size() << "\n";
    forn(i, ans.size())
    {
        cout << ans[i] << "\n";
    }

    return 0;
}


#include<iostream>

int n,x[100005],y[100005],sum[100005],cnt;

void printer(){
    printf("%d\n",cnt);
    for(int i=1; i<=n; i++){
        if (x[i] > 0) printf("1 %d R\n",abs(x[i]));
        if (y[i] > 0) printf("1 %d U\n",abs(y[i]));
        if (x[i] < 0) printf("1 %d L\n",abs(x[i]));
        if (y[i] < 0) printf("1 %d D\n",abs(y[i]));
        printf("2\n");
        if (x[i] < 0) printf("1 %d R\n",abs(x[i]));
        if (y[i] < 0) printf("1 %d U\n",abs(y[i]));
        if (x[i] > 0) printf("1 %d L\n",abs(x[i]));
        if (y[i] > 0) printf("1 %d D\n",abs(y[i]));
        printf("3\n");
    }
}

void quicksort(int left, int right){
    int i = left; int j = right; int value = sum[rand()%(right-left+1)+left]; int chg;
    while (i<=j){
        while (sum[i] < value) i++;
        while (sum[j] > value) j--;
        if (i<=j){
            chg = sum[i]; sum[i]=sum[j]; sum[j]=chg;
            chg = x[i]; x[i] = x[j]; x[j] = chg;
            chg = y[i]; y[i]=y[j]; y[j]=chg;
            i++; j--;
        }

    }
    if (i<right) quicksort(i,right);
    if (j>left) quicksort(left,j);
}

int main(){
    scanf("%d",&n);
    cnt = 0;
    for(int i=1; i<=n; i++){
        scanf("%d %d",&x[i],&y[i]);
        sum[i] = abs(x[i]) + abs(y[i]);
        if (x[i] != 0) cnt+=2; if (y[i] != 0) cnt+=2; cnt+=2;
    }
    quicksort(1,n);
    printer();
}


#include<iostream>
#include<string>

int n,x[100005],y[100005],sum[100005],cnt;

void printer(){
    printf("%d\n",cnt);
    for(int i=1; i<=n; i++){
        if (x[i] > 0) printf("1 %d R\n",abs(x[i]));
        if (y[i] > 0) printf("1 %d U\n",abs(y[i]));
        if (x[i] < 0) printf("1 %d L\n",abs(x[i]));
        if (y[i] < 0) printf("1 %d D\n",abs(y[i]));
        printf("%d\n",2);
        if (x[i] < 0) printf("1 %d R\n",abs(x[i]));
        if (y[i] < 0) printf("1 %d U\n",abs(y[i]));
        if (x[i] > 0) printf("1 %d L\n",abs(x[i]));
        if (y[i] > 0) printf("1 %d D\n",abs(y[i]));
        printf("%d\n",3);
    }
}

void quicksort(int left, int right){
    int i = left; int j = right; int value = sum[(left+right)/2]; int chg;
    while (i<=j){
        while (sum[i] < value) i++;
        while (sum[j] > value) j--;
        if (i<=j){
            chg = sum[i]; sum[i]=sum[j]; sum[j]=chg;
            chg = x[i]; x[i] = x[j]; x[j] = chg;
            chg = y[i]; y[i]=y[j]; y[j]=chg;
            i++; j--;
        }

    }
    if (i<right) quicksort(i,right);
    if (j>left) quicksort(left,j);
}

int main(){
    scanf("%d",&n);
    cnt = 0;
    for(int i=1; i<=n; i++){
        scanf("%d %d",&x[i],&y[i]);
        sum[i] = abs(x[i]) + abs(y[i]);
        if (x[i] != 0) cnt+=2; if (y[i] != 0) cnt+=2; cnt+=2;
    }
    quicksort(1,n);
    printer();
}


#include <iostream>

using std::cin;
using std::cout;

struct Pair{
    int a;
    int b;
};

long abs2(int a)
{
    return a>0?a:-a;
}

void qsort(Pair array[100000], int firstIndex, int secondIndex)
{
    Pair mainEl = array[firstIndex];
    int l = firstIndex;
    int r = secondIndex;

    while (l < r)
    {

        while (abs2(array[l].a) + abs2(array[l].b) < abs2(mainEl.a) + abs2(mainEl.b));
        {
            l++;
        }

        while (abs2(array[r].a) + abs2(array[r].b) > abs2(mainEl.a) + abs2(mainEl.b))

        {
            r--;
        }

        if (l <= r)
        {
            Pair changer;
            changer.a = array[l].a;
            changer.b = array[l].b;
            array[l] = array[r];
            array[r] = changer;
            l++;
            r--;
        }

    }

    if (r > firstIndex)
    {
        qsort(array, firstIndex, r);
    }

    if (secondIndex > l)
    {
        qsort(array, l, secondIndex);
    }
}

int main()
{
    int n;
    cin >> n;
    Pair arP[100000];
    int number = 0;
    for (int i = 0; i < n; ++i)
    {
        int t, k;
        cin >> t;
        cin >> k;
        Pair op;
        op.a = t;
        op.b = k;
        arP[i] = op;

        if ((op.a != 0) && (op.b != 0))
        {
            number++;
        }
    }

    qsort(arP, 0 , n-1);

            cout << number * 6 + (n - number) * 4 << "\n";

            for (int i  = 0; i < n; ++i)
            {
            if (arP[i].a > 0)
            {

                cout << "1 " << arP[i].a << " R\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {   if (arP[i].b < 0) {
                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    }
                    else    cout << "2\n";

                }
                cout << "1 " << arP[i].a << " L\n";

            }
            else
            {
                if (arP[i].a < 0) {
                cout << "1 " << -arP[i].a << " L\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    } else  cout << "2\n";

                }
                cout << "1 " << -arP[i].a << " R\n";
                } else
                {
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    } else  cout << "2\n";

                }
            }
        }
        cout << "3\n";

    }
    return 0;
}


#include <iostream>
#include<algorithm>

using namespace std;

struct Pair{
    int a;
    int b;
};

int abs2(int a)
{
    return a>0?a:-a;
}

bool tmp(Pair s, Pair d)
{
    if ((abs2(s.a) < abs2(d.a)) || ((abs2(s.a) == abs2(d.a)) && (abs2(s.b) < abs2(d.b))) )
    {
        return true;
    }
    return false;
}

int main()
{
    int n;
    cin >> n;
    Pair arP[100005];
    int number = 0;
    for (int i = 0; i < n; ++i)
    {
        int t, k;
        cin >> t;
        cin >> k;
        Pair op;
        op.a = t;
        op.b = k;
        arP[i] = op;

        if ((op.a != 0) && (op.b != 0))
        {
            number++;
        }
    }

    sort(arP, arP + n , tmp);

            cout << number * 6 + (n - number) * 4 << "\n";

            for (int i  = 0; i < n; ++i)
            {
            if (arP[i].a > 0)
            {

                cout << "1 " << arP[i].a << " R\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {   if (arP[i].b < 0) {
                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    }
                    else    cout << "2\n";

                }
                cout << "1 " << arP[i].a << " L\n";

            }
            else
            {
                if (arP[i].a < 0) {
                cout << "1 " << -arP[i].a << " L\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    } else  cout << "2\n";

                }
                cout << "1 " << -arP[i].a << " R\n";
                } else
                {
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    } else  cout << "2\n";

                }
            }
        }
        cout << "3\n";

    }
    return 0;
}


#include <iostream>
#include<algorithm>

using namespace std;

struct Pair{
    int a;
    int b;
};

long abs2(int a)
{
    return a>0?a:-a;
}

bool tmp(Pair s, Pair d)
{
    if ((s.a < d.a) || ((s.a == d.a) && (s.b < d.b)) )
    {
        return true;
    }
    return false;
}

int main()
{
    int n;
    cin >> n;
    Pair arP[100000];
    int number = 0;
    for (int i = 0; i < n; ++i)
    {
        int t, k;
        cin >> t;
        cin >> k;
        Pair op;
        op.a = t;
        op.b = k;
        arP[i] = op;

        if ((op.a != 0) && (op.b != 0))
        {
            number++;
        }
    }

    sort(arP, arP + n , tmp);

            cout << number * 6 + (n - number) * 4 << "\n";

            for (int i  = 0; i < n; ++i)
            {
            if (arP[i].a > 0)
            {

                cout << "1 " << arP[i].a << " R\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {   if (arP[i].b < 0) {
                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    }
                    else    cout << "2\n";

                }
                cout << "1 " << arP[i].a << " L\n";

            }
            else
            {
                if (arP[i].a < 0) {
                cout << "1 " << -arP[i].a << " L\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    } else  cout << "2\n";

                }
                cout << "1 " << -arP[i].a << " R\n";
                } else
                {
                if (arP[i].b > 0)
                {
                    cout << "1 " << arP[i].b << " U\n";
                    cout << "2\n";
                    cout << "1 " << arP[i].b << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << -arP[i].b << " D\n";
                    cout << "2\n";
                    cout << "1 " << -arP[i].b << " U\n";
                    } else  cout << "2\n";

                }
            }
        }
        cout << "3\n";

    }
    return 0;
}


#include <iostream>

using std::cin;
using std::cout;

struct Pair{
    int a;
    int b;
};

long abs(long a)
{
    return a>0?a:-a;
}

void qsort(Pair array[100000], int firstIndex, int secondIndex)
{
    Pair mainEl = array[firstIndex];
    int l = firstIndex;
    int r = secondIndex;

    while (l < r)
    {

        while ((abs(array[l].a) < abs(mainEl.a)) || ((abs(array[l].a) == abs(mainEl.a)) && (abs(array[l].b) < abs(mainEl.b))))
        {
            l++;
        }

        while ((abs(array[l].a) > abs(mainEl.a)) || ((abs(array[l].a) == abs(mainEl.a)) && (abs(array[l].b) > abs(mainEl.b))))

        {
            r--;
        }

        if (l <= r)
        {
            Pair changer;
            changer.a = array[l].a;
            changer.b = array[l].b;
            array[l] = array[r];
            array[r] = changer;
            l++;
            r--;
        }

    }

    if (r > firstIndex)
    {
        qsort(array, firstIndex, r);
    }

    if (secondIndex > l)
    {
        qsort(array, l, secondIndex);
    }
}

int main()
{
    int n;
    cin >> n;
    Pair arP[100000];
    int number = 0;
    for (int i = 0; i < n; ++i)
    {
        int t, k;
        cin >> t >> k;
        Pair op;
        op.a = t;
        op.b = k;
        arP[i] = op;

        if ((op.a != 0) && (op.b != 0))
        {
            number++;
        }
    }

    qsort(arP, 0 , n -1);
            cout << number * 6 + (n - number) * 4 << "\n";

            for (int i  = 0; i < n; ++i)
        {
            if (arP[i].a > 0)
            {

                cout << "1 " << abs(arP[i].a) << " R\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << abs(arP[i].b) << " U\n";
                    cout << "2\n";
                    cout << "1 " << abs(arP[i].b) << " D\n";

                }
                else
                {   if (arP[i].b < 0) {
                    cout << "1 " << abs(arP[i].b) << " D\n";
                    cout << "2\n";
                    cout << "1 " << abs(arP[i].b) << " U\n";
                    }
                    else    cout << "2\n";

                }
                cout << "1 " << abs(arP[i].a) << " L\n";

            }
            else
            {
                if (arP[i].a < 0) {
                cout << "1 " << abs(arP[i].a) << " L\n";
                if (arP[i].b > 0)
                {
                    cout << "1 " << abs(arP[i].b) << " U\n";
                    cout << "2\n";
                    cout << "1 " << abs(arP[i].b) << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << abs(arP[i].b) << " D\n";
                    cout << "2\n";
                    cout << "1 " << abs(arP[i].b) << " U\n";
                    } else  cout << "2\n";

                }
                cout << "1 " << abs(arP[i].a) << " R\n";
                } else
                {
                if (arP[i].b > 0)
                {
                    cout << "1 " << abs(arP[i].b) << " U\n";
                    cout << "2\n";
                    cout << "1 " << abs(arP[i].b) << " D\n";

                }
                else
                {
                 if (arP[i].b < 0) {

                    cout << "1 " << abs(arP[i].b) << " D\n";
                    cout << "2\n";
                    cout << "1 " << abs(arP[i].b) << " U\n";
                    } else  cout << "2\n";

                }
            }
            }
            cout << "3\n";

    }
    return 0;
}