n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) ans = 0 if a == b: print(0) exit() lism = [] lisp = [] for i in range(n): if a[i] == b[i]: continue if a[i] > b[i]: lisp.append([i+1,a[i]-b[i]]) else: lism.append([i+1,b[i]-a[i]]) lism.reverse() ans = [] num = 0 for i,cnt in lism: for j in range(cnt): ans.append([i,"R"]) num += cnt for i,cnt in lisp: for j in range(cnt): ans.append([i,"L"]) num += cnt print(num) for i in ans: print(*ans)