#[macro_export] macro_rules! setup { { mut $input:ident: SplitWhitespace $(,)? } => { use std::io::Read; let mut buf = String::new(); std::io::stdin().read_to_string(&mut buf).ok(); let mut $input = buf.split_whitespace(); }; } #[macro_export] macro_rules! parse_next { ($str_iter:expr) => { $str_iter.next().unwrap().parse().ok().unwrap() }; } #[allow(unused_imports)] use std::collections::{HashMap, HashSet, VecDeque}; fn main() { setup! { mut input: SplitWhitespace }; let _h: usize = parse_next!(input); let _w: usize = parse_next!(input); let n: (usize, usize) = (parse_next!(input), parse_next!(input)); let z: (usize, usize) = (parse_next!(input), parse_next!(input)); macro_rules! manhattan_distance { ($x:expr, $y:expr) => {{ let x_1 = $x.0 as i64; let x_2 = $x.1 as i64; let y_1 = $y.0 as i64; let y_2 = $y.1 as i64; (x_1 - y_1).abs() + (x_2 - y_2).abs() }}; } let ans = match (|| { if manhattan_distance!(n, z) % 2 != 0 { return true; } return false; })() { true => "Yes", false => "No", }; println!("{}", ans); }