#[allow(unused_imports)] use proconio::{ input, marker::{Bytes, Chars, Usize1}, }; fn main() { input! { a: isize, b: isize, c: isize, d: isize, } let res = if a == c || b == d || (a - c).abs() + (b - d).abs() <= 3 { 1 } else { 2 }; println!("{}", res); }