use std::io::{Read, stdin};

fn main() {
    let mut buf = String::new();
    stdin().read_to_string(&mut buf).unwrap();
    let mut tok = buf.split_whitespace();
    let mut get = || tok.next().unwrap().parse::<i64>().unwrap();
    let a = get();
    let b = get();
    if a % 2 != 0 && b % 2 != 0 {
        println!("No");
        return;
    }
    let mut xs = vec![];
    xs.push((a, b));
    while !xs.is_empty() {
        let mut ys = vec![];
        for &(a, b) in xs.iter() {
            if a == 0 && b == 0 {
                println!("Yes");
                return;
            }
            let ma = a & 1;
            let mb = b & 1;
            if ma == 0 && b > 0 {
                let a = a >> 1;
                let b = b - 1;
                if a < b {
                        ys.push((a, b));
                } else {
                        ys.push((b, a));
                }
            }
            if mb == 0 && a > 0 {
                let a = a - 1;
                let b = b >> 1;
                if a < b {
                        ys.push((a, b));
                } else {
                        ys.push((b, a));
                }
            }
            
        }
        xs = ys;
    }
    println!("No");
}