n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = [a[i] - b[i] for i in range(n)] pl_inds = [i for i in range(n) if c[i] >= 0] mi_inds = [i for i in range(n) if c[i] < 0] mi_inds = mi_inds[::-1] ans = [] for i in pl_inds: ans.extend([[i + 1, "L"]] * c[i]) for i in mi_inds: ans.extend([[i + 1, "R"]] * abs(c[i])) print(len(ans)) for i in ans: print(*i)