operation=[] n=int(input()) a=list(map(int,input().split())) b=list(map(int,input().split())) for i in range(n): if a[i]b[i]: operation.append((1,i,i)) operation.append((2,i,i)) operation.append((1,i,i)) print(len(operation)) for t,p,q in operation: print(t,p+1,q+1)