{"raw_statement":[{"iden":"problem statement","content":"You are given sequences of positive integers of length $N$: $A=(A_1,A_2,\\ldots,A_N),B=(B_1,B_2,\\ldots,B_N)$.\nDetermine whether there exists an integer sequence $X=(X_1,X_2,\\ldots,X_N)$ that satisfies all the following conditions, and if it exists, find one.\n\n*   $-10^8\\le X_i\\le 10^8$ $(1\\le i\\le N)$\n*   $\\displaystyle \\sum_{i=1}^N A_iX_i > 0$\n*   $\\displaystyle \\sum_{i=1}^N B_iX_i < 0$\n\nYou are given $T$ test cases, so find the answer for each."},{"iden":"constraints","content":"*   $1\\le T\\le 2\\times 10^5$\n*   $1\\le N\\le 2\\times 10^5$\n*   $1\\le A_i,B_i\\le 10^5$\n*   The sum of $N$ over all test cases is at most $2\\times 10^5$.\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$T$\n$\\text{case}_1$\n$\\text{case}_2$\n$\\vdots$\n$\\text{case}_T$\n\nEach test case is given in the following format:\n\n$N$\n$A_1$ $A_2$ $\\ldots$ $A_N$\n$B_1$ $B_2$ $\\ldots$ $B_N$"},{"iden":"sample input 1","content":"3\n3\n3 1 4\n1 5 1\n3\n4 4 4\n7 7 7\n4\n20 25 6 15\n31 41 59 26"},{"iden":"sample output 1","content":"Yes\n4 -5 1\nNo\nYes\n45 -10 -40 11\n\nFor the first test case, if we set $X=(4,-5,1)$, then\n\n*   $\\displaystyle \\sum_{i=1}^3 A_iX_i=3\\times 4+1\\times (-5)+4\\times 1=11>0$\n*   $\\displaystyle \\sum_{i=1}^3 B_iX_i=1\\times 4+5\\times (-5)+1\\times 1=-20<0$\n\nwhich satisfies the conditions. Other examples that satisfy the conditions include $X=(3,-3,1)$ and $X=(27,-40,22)$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}