{"trustable":true,"sections":[{"title":"Description","value":{"format":"MD","content":"There is a chessboard with a $n \\times m$ on it, and a knight is located at point $(x, y)$. Your task is to calculate the minimum number of steps the knight needs to reach any point on the chessboard."}},{"title":"Input","value":{"format":"MD","content":"There is only one line of input containing four integers, which are $n, m, x, y$."}},{"title":"Output","value":{"format":"MD","content":"A $n \\times m$ matrix representing the minimum number of steps the knight needs to reach a certain point (output $-1$ if it is unreachable)."}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 3 1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0 3 2 \n3 -1 1 \n2 1 4 \u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Hint","value":{"format":"MD","content":"### Constraints\n\nFor all test cases, it is guaranteed that $1 \\leq x \\leq n \\leq 400$, $1 \\leq y \\leq m \\leq 400$."}}]}