{"raw_statement":[{"iden":"problem statement","content":"There is an infinite two-dimensional grid, and we have a piece called Super Ryuma at square $(r_1, c_1)$. _(Ryu means dragon and Ma means horse.)_ In one move, the piece can go to one of the squares shown below:\n![image](https://img.atcoder.jp/ghi/5e0cee61638840363c9e267280c1804e.jpg)\nMore formally, when Super Ryuma is at square $(a, b)$, it can go to square $(c, d)$ such that at least one of the following holds:\n\n*   $a + b = c + d$\n*   $a - b = c - d$\n*   $|a - c| + |b - d| \\le 3$\n\nFind the minimum number of moves needed for the piece to reach $(r_2, c_2)$ from $(r_1, c_1)$."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\le r_1, c_1, r_2, c_2 \\le 10^9$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$r_1$ $c_1$\n$r_2$ $c_2$"},{"iden":"sample input 1","content":"1 1\n5 6"},{"iden":"sample output 1","content":"2\n\nWe need two moves - for example, $(1, 1) \\rightarrow (5, 5) \\rightarrow (5, 6)$."},{"iden":"sample input 2","content":"1 1\n1 200001"},{"iden":"sample output 2","content":"2\n\nWe need two moves - for example, $(1, 1) \\rightarrow (100001, 100001) \\rightarrow (1, 200001)$."},{"iden":"sample input 3","content":"2 3\n998244353 998244853"},{"iden":"sample output 3","content":"3\n\nWe need three moves - for example, $(2, 3) \\rightarrow (3, 3) \\rightarrow (-247, 253) \\rightarrow (998244353, 998244853)$."},{"iden":"sample input 4","content":"1 1\n1 1"},{"iden":"sample output 4","content":"0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}