{"raw_statement":[{"iden":"problem statement","content":"You are given sequences of non-negative integers: $A = (A_1, \\ldots, A_N)$ and $B=(B_1, \\ldots, B_N)$.\nDetermine whether one can make $A$ equal $B$ by performing the following operation between $0$ and $N$ times, inclusive.\n\n*   Operation: Choose integers $x,y$ such that $0\\leq x < y\\leq 10^{18}$. For every $i$, replace $A_i$ with $(A_i+x)\\bmod y$.\n\nIf one can make $A$ equal $B$, print one way to do so."},{"iden":"constraints","content":"*   $1\\leq N\\leq 1000$\n*   $0\\leq A_i\\leq 10^9$\n*   $0\\leq B_i\\leq 10^9$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $\\ldots$ $A_N$\n$B_1$ $\\ldots$ $B_N$"},{"iden":"sample input 1","content":"4\n7 2 4 5\n3 3 5 0"},{"iden":"sample output 1","content":"Yes\n2\n3 5\n3 6\n\nOne can make $A$ equal $B$ as follows.\n\n*   Initially, $A = (7,2,4,5)$.\n*   The operation with $(x,y) = (3,5)$ makes $A = (0,0,2,3)$.\n*   The operation with $(x,y) = (3,6)$ makes $A = (3,3,5,0)$."},{"iden":"sample input 2","content":"1\n5\n3"},{"iden":"sample output 2","content":"Yes\n1\n2 4"},{"iden":"sample input 3","content":"2\n3 1\n3 1"},{"iden":"sample output 3","content":"Yes\n0"},{"iden":"sample input 4","content":"2\n0 0\n1 2"},{"iden":"sample output 4","content":"No"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}