#ABC474D. 总重压制 / Outweigh

总重压制 / Outweigh

Problem Statement

There are NN types of stones, 1,2,,N1,2,\dots,N. Stones of the same type all have the same weight. Takahashi and Aoki have AiA_i and BiB_i stones of type ii, respectively. Determine whether there exists a sequence of positive integers W=(W1,W2,,WN)W=(W_1,W_2,\dots,W_N) satisfying the following conditions, and if it exists, construct one such sequence.

  • 1Wi10181 \leq W_i \leq 10^{18}
  • If the weight of a type-ii stone is WiW_i, the total weight of the stones Takahashi has is strictly greater than the total weight of the stones Aoki has.

Constraints

  • 1N1051 \leq N \leq 10^5
  • 1Ai1091 \leq A_i \leq 10^9
  • 1Bi1091 \leq B_i \leq 10^9
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

  • NN
  • A1A_1 A2A_2 \dots ANA_N
  • B1B_1 B2B_2 \dots BNB_N

Output

If there exists W=(W1,W2,,WN)W=(W_1,W_2,\dots,W_N) satisfying the conditions, output it in the following format:

  • Yes
  • W1W_1 W2W_2 \dots WNW_N

If there is no W=(W1,W2,,WN)W=(W_1,W_2,\dots,W_N) satisfying the conditions, output No in one line.

3
4 7 4
5 5 5
Yes
4 7 4

If W=(4,7,4)W=(4,7,4), the total weight of the stones Takahashi has is 4×4+7×7+4×4=814 \times 4 + 7 \times 7 + 4 \times 4=81. The total weight of the stones Aoki has is 4×5+7×5+4×5=754 \times 5 + 7 \times 5 + 4 \times 5=75.

3
3 3 3
4 7 4
No
1
2
2
No