{"raw_statement":[{"iden":"problem statement","content":"There is a grid with $H$ rows and $W$ columns, where the cell at the $i$\\-th row from the top and $j$\\-th column from the left is denoted as $(i,j)$. The grid has a hole only in cell $(r,c)$. We will tile all cells without a hole using several tiles. You are given non-negative integers $N$ and $M$ such that $H \\times W=L \\times (N+M)+1$. A tile of $1$ row and $L$ columns is called a horizontal tile, and a tile of $L$ rows and $1$ column is called a vertical tile. Determine whether there exists a way to tile using exactly $N$ horizontal tiles and $M$ vertical tiles without rotation, and also show one such way if it exists. For details on the output format and more precise conditions, check the output section.\nSolve $T$ test cases for each input file."},{"iden":"constraints","content":"*   $1 \\leq T \\leq 5$\n*   $1 \\leq H \\leq 1000$\n*   $1 \\leq W \\leq 1000$\n*   $2 \\leq H \\times W$\n*   $2 \\leq L \\leq 1000$\n*   $0 \\leq N$\n*   $0 \\leq M$\n*   $1 \\leq r \\leq H$\n*   $1 \\leq c \\leq W$\n*   $H \\times W=L \\times (N+M)+1$\n*   The sum of $N+M$ over all test cases is at most $6\\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$case_1$\n$case_2$\n$\\vdots$\n$case_T$\n\nEach case is given in the following format:\n\n$H$ $W$ $L$ $N$ $M$ $r$ $c$"},{"iden":"sample input 1","content":"3\n1 3 2 1 0 1 1\n1 3 2 1 0 1 2\n3 3 2 1 3 1 1"},{"iden":"sample output 1","content":"Yes\n1 2\nNo\nYes\n3 2\n2 1\n1 2\n1 3\n\nIn the third test case, there is a hole in the top-left cell. It can be tiled as follows:\n\n  ┌─┬─┐\n┌─┤ │ │\n│ ├─┴─┤\n└─┴───┘"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}