use std::io::*; 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 x: i64 = itr.next().unwrap().parse::().unwrap().abs(); let y: i64 = itr.next().unwrap().parse::().unwrap().abs(); // 2a + b = x // a + 2b = y let a = ((2 * x - y) / 3).abs(); let b = ((x - y * 2) / 3).abs(); if (x + y) % 3 == 0 && a + b <= 3 { println!("YES",) } else { println!("NO",) } }