a = list(map(int,input().split())) d = list(map(int,input().split())) if a == d: print("Yes") else: a = sorted(a) d = sorted(d) if a == d: print("Yes") print("2") else: lis = [] is_sort = 0 for i in range(3): if abs(a[i]) == abs(d[1]): pass else: is_sort = 1 abs_a = [[abs(a[i]),i] for i in range(3)] abs_d = [[abs(d[i]),i] for i in range(3)] abs_a.sort(key= lambda val : val[0]) abs_d.sort(key= lambda val : val[0]) lis = [] is_yes = 1 for i in range(3): if a[abs_a[i][1]] == -d[abs_d[i][1]]: lis.append(abs_a[i][1]) elif abs_a[i][0] == abs_d[i][0]: pass else: is_yes = 0 if is_yes: print("Yes") if is_sort: print(2) for i in range(len(lis)): print(1, (lis[i]+1)%3) print(1, (lis[i]+1)%3) else: print("No")