use std::io::*; fn dfs(list: &mut Vec<(i64, i64)>, mov: &[(i64, i64)], d: usize, cx: i64, cy: i64) { if d <= 3 { list.push((cx, cy)); for &m in mov.iter() { dfs(list, &mov, d + 1, cx + m.0, cy + m.1); } } } fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let p = ( itr.next().unwrap().parse::().unwrap(), itr.next().unwrap().parse::().unwrap(), ); let mov = [ (-2, -1), (-2, 1), (-1, -2), (-1, 2), (1, -2), (1, 2), (2, -1), (2, 1), ] .to_vec(); let mut list = Vec::new(); dfs(&mut list, &mov, 0, 0, 0); if let Some(_) = list.iter().find(|&&x| x == p) { println!("YES",) } else { println!("NO",) } }