{"raw_statement":[{"iden":"problem statement","content":"You are given a matrix $A$ with $H_1$ rows and $W_1$ columns, and a matrix $B$ with $H_2$ rows and $W_2$ columns.\n\n*   For all integer pairs $(i, j)$ such that $1 \\leq i \\leq H_1$ and $1 \\leq j \\leq W_1$, the element at the $i$\\-th row and $j$\\-th column of matrix $A$ is $A_{i, j}$.\n*   For all integer pairs $(i, j)$ such that $1 \\leq i \\leq H_2$ and $1 \\leq j \\leq W_2$, the element at the $i$\\-th row and $j$\\-th column of matrix $B$ is $B_{i, j}$.\n\nYou may perform the following operations on the matrix $A$ any number of (possibly $0$) times in any order:\n\n*   Choose an arbitrary row of $A$ and remove it.\n*   Choose an arbitrary column of $A$ and remove it.\n\nDetermine if it is possible to make the matrix $A$ equal the matrix $B$."},{"iden":"constraints","content":"*   $1 \\leq H_2 \\leq H_1 \\leq 10$\n*   $1 \\leq W_2 \\leq W_1 \\leq 10$\n*   $1 \\leq A_{i, j} \\leq 10^9$\n*   $1 \\leq B_{i, j} \\leq 10^9$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$H_1$ $W_1$\n$A_{1, 1}$ $A_{1, 2}$ $\\ldots$ $A_{1, W_1}$\n$A_{2, 1}$ $A_{2, 2}$ $\\ldots$ $A_{2, W_1}$\n$\\vdots$\n$A_{H_1, 1}$ $A_{H_1, 2}$ $\\ldots$ $A_{H_1, W_1}$\n$H_2$ $W_2$\n$B_{1, 1}$ $B_{1, 2}$ $\\ldots$ $B_{1, W_2}$\n$B_{2, 1}$ $B_{2, 2}$ $\\ldots$ $B_{2, W_2}$\n$\\vdots$\n$B_{H_2, 1}$ $B_{H_2, 2}$ $\\ldots$ $B_{H_2, W_2}$"},{"iden":"sample input 1","content":"4 5\n1 2 3 4 5\n6 7 8 9 10\n11 12 13 14 15\n16 17 18 19 20\n2 3\n6 8 9\n16 18 19"},{"iden":"sample output 1","content":"Yes\n\nRemoving the $2$\\-nd column from the initial $A$ results in:\n\n1 3 4 5\n6 8 9 10\n11 13 14 15\n16 18 19 20\n\nThen, removing the $3$\\-rd row from $A$ results in:\n\n1 3 4 5\n6 8 9 10\n16 18 19 20\n\nThen, removing the $1$\\-st row from $A$ results in:\n\n6 8 9 10\n16 18 19 20\n\nThen, removing the $4$\\-th column from $A$ results in:\n\n6 8 9\n16 18 19\n\nNow the matrix equals the matrix $B$.  \nThus, we can make the matrix $A$ equal the matrix $B$ by repeating the operations, so `Yes` should be printed."},{"iden":"sample input 2","content":"3 3\n1 1 1\n1 1 1\n1 1 1\n1 1\n2"},{"iden":"sample output 2","content":"No\n\nRegardless of how we perform the operations, we cannot make the matrix $A$ equal the matrix $B$, so `No` should be printed."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}