{"raw_statement":[{"iden":"problem statement","content":"We have a square grid with $H$ rows and $W$ columns. Snuke wants to write $0$ or $1$ in each of the squares. Here, all of the following conditions have to be satisfied:\n\n*   For every row, the smaller of the following is $A$: the number of $0$s contained in the row, and the number of $1$s contained in the row. (If these two numbers are equal, “the smaller” should be read as “either”.)\n*   For every column, the smaller of the following is $B$: the number of $0$s contained in the column, and the number of $1$s contained in the column.\n\nDetermine if these conditions can be satisfied by writing $0$ or $1$ in each of the squares. If the answer is yes, show one way to fill the squares so that the conditions are satisfied."},{"iden":"constraints","content":"*   $1 \\leq H,W \\leq 1000$\n*   $0 \\leq A$\n*   $2 \\times A \\leq W$\n*   $0 \\leq B$\n*   $2 \\times B \\leq H$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$H$ $W$ $A$ $B$"},{"iden":"sample input 1","content":"3 3 1 1"},{"iden":"sample output 1","content":"100\n010\n001\n\nEvery row contains two $0$s and one $1$, so the first condition is satisfied. Also, every column contains two $0$s and one $1$, so the second condition is satisfied."},{"iden":"sample input 2","content":"1 5 2 0"},{"iden":"sample output 2","content":"01010"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}