{"raw_statement":[{"iden":"problem statement","content":"Takahashi is drawing a segment on grid paper.\nFrom a certain square, a square that is $x$ squares to the right and $y$ squares above, is denoted as square $(x, y)$.\nWhen Takahashi draws a segment connecting the lower left corner of square $(A, B)$ and the lower left corner of square $(C, D)$, find the number of the squares crossed by the segment.\nHere, the segment is said to _cross_ a square if the segment has non-empty intersection with the region within the square, excluding the boundary."},{"iden":"constraints","content":"*   $1 \\leq A, B, C, D \\leq 10^9$\n*   At least one of $A \\neq C$ and $B \\neq D$ holds."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$A$ $B$ $C$ $D$"},{"iden":"sample input 1","content":"1 1 3 4"},{"iden":"sample output 1","content":"4"},{"iden":"sample input 2","content":"2 3 10 7"},{"iden":"sample output 2","content":"8"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}