function Main(input) {
    var tmp = input.split(" ");
    var num = parseInt(tmp[0]);
    var leg = parseInt(tmp[1]);
    console.log(num);
    console.log(leg);
    
    if(leg%2===1 || leg===0 || tmp===0){
        console.log("NO");
    }else{
        if(num*2<=leg || leg<=leg*2){
            console.log("YES");
        }else{
            console.log("NO");
        }
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));