#arc145e. [arc145_e]Adjacent XOR

[arc145_e]Adjacent XOR

Problem Statement

You are given two sequences, each of length NN, consisting of non-negative integers: A=(A1,A2,ldots,AN)A=(A_1,A_2,\\ldots,A_{N}) and B=(B1,B2,ldots,BN)B=(B_1,B_2,\\ldots,B_{N}).

Determine whether it is possible to make AA equal to BB by performing the operation below at most 7000070000 times. If it is possible, present a specific sequence of operations that achieves it.

  • Choose an integer K(1leKleN)K\\ (1\\le K \\le N). For every integer i(2leqileqK)i\\ (2\\leq i \\leq K), simultaneously replace the value of AiA_i with Ai1oplusAiA_{i-1} \\oplus A_i.

Here, oplus\\oplus denotes bitwise mathrmXOR\\mathrm{XOR}.

What is bitwise mathrmXOR\\mathrm{XOR}?

The bitwise mathrmXOR\\mathrm{XOR} of non-negative integers AA and BB, AoplusBA\\oplus B, is defined as follows:

  • When AoplusBA\\oplus B is written in base two, the digit in the 2k2^k's place (kgeq0k \\geq 0) is 11 if exactly one of the digits in that place of AA and BB are 11, and 00 otherwise.

For example, 3oplus5=63\\oplus 5 = 6 (in base two: 011oplus101=110011\\oplus 101 = 110).

Constraints

  • 2leqNleq10002 \\leq N \\leq 1000
  • 0leqAi,Bi<2600 \\leq A_i, B_i < 2^{60}
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN A1A_1 A2A_2 ldots\\ldots ANA_N B1B_1 B2B_2 ldots\\ldots BNB_N

Output

If it is impossible to make AA equal to BB in at most 7000070000 operations, print No. If it is possible, print a sequence of operations that achieves it in the following format, where MM is the number of operations, and KiK_i is the integer chosen in the ii-th operation:

Yes MM K1K_1 K2K_2 ldots\\ldots KMK_M

If multiple solutions exist, any of them will be accepted.


Sample Input 1

3
1 2 0
1 2 3

Sample Output 1

Yes
2
2 3

In this output, the sequence AA is changed as follows:

  • Initially: A=(1,2,0)A=(1, 2, 0).
  • After the 11-st operation: A=(1,3,0)A=(1, 3, 0).
  • After the 22-nd operation: A=(1,2,3)A=(1, 2, 3).

After the two operations, AA and BB are equal, achieving the objective.


Sample Input 2

2
10 100
1 0

Sample Output 2

No

Sample Input 3

2
1152921504606846975 0
1152921504606846975 0

Sample Output 3

Yes
0