Problem:
Score : 200 points

Problem Statement

There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.

Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Constraints

1 \leq X \leq 100

1 \leq Y \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If there is a combination of numbers of cranes and turtles in which the statement is correct, print Yes; otherwise, print No.

Sample Input 1

3 8

Sample Output 1

Yes

The statement "there are 3 animals in total in the garden, and they have 8 legs in total" is correct if there are two cranes and one turtle. Thus, there is a combination of numbers of cranes and turtles in which the statement is correct.

Sample Input 2

2 100

Sample Output 2

No

There is no combination of numbers of cranes and turtles in which this statement is correct.

Sample Input 3

1 2

Sample Output 3

Yes

We also consider the case in which there are only cranes or only turtles.

Solution in C# (.NET Core 3.1.201) (judge verdict: Accepted)

using System;
using static System.Console;
using static Atcoder_Template_NetCore3.MyUtil;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;
using System.Threading.Tasks;
using System.IO;

namespace Atcoder_Template_NetCore3
{
    class Program
    {
        static void Main()
        {
            var (x, y) = ReadInt2();
            WriteLine((2 * x <= y) && (y <= 4 * x) && (y % 2 == 0) ? "Yes" : "No");
        }
    }

    static class MyUtil
    {
        /// <summary>
        /// 指定の桁のビットを取得します。
        /// </summary>
        /// <param name="num"></param>
        /// <param name="count">取得する桁。</param>
        /// <returns></returns>
        public static int GetBit(this int num, int count)
        {
            int mask = (int)Math.Pow(2, count - 1);
            return (num & mask) == 0 ? 0 : 1;
        }

        /// <summary>
        /// <c>int</c>を2進数ビット配列に変換します。
        /// </summary>
        /// <param name="num"></param>
        /// <returns></returns>
        public static int[] ToBitArray(this int num)
        {
            const int size = sizeof(int) * 8;
            var array = new int[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = num.GetBit(size - i);
            }
            return array;
        }

        #region AutoGeneratedCode 整数読み取り系
        public static ValueTuple<int, int> ReadInt2()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1]);
        }
        public static ValueTuple<long, long> ReadLong2()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1]);
        }
        public static ValueTuple<int, int, int> ReadInt3()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2]);
        }
        public static ValueTuple<long, long, long> ReadLong3()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2]);
        }
        public static ValueTuple<int, int, int, int> ReadInt4()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3]);
        }
        public static ValueTuple<long, long, long, long> ReadLong4()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3]);
        }
        public static ValueTuple<int, int, int, int, int> ReadInt5()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4]);
        }
        public static ValueTuple<long, long, long, long, long> ReadLong5()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4]);
        }
        public static ValueTuple<int, int, int, int, int, int> ReadInt6()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5]);
        }
        public static ValueTuple<long, long, long, long, long, long> ReadLong6()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5]);
        }
        public static ValueTuple<int, int, int, int, int, int, int> ReadInt7()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5], input[6]);
        }
        public static ValueTuple<long, long, long, long, long, long, long> ReadLong7()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5], input[6]);
        }
        #endregion
        /// <summary>
        /// 標準入力からスペース区切りの数値を <see cref="int"/> 配列として読み取ります。
        /// </summary>
        /// <returns></returns>
        public static int[] ReadintArray()
        {
            return ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        }

        /// <summary>
        /// 標準入力からスペース区切りの数値を <see cref="long"/> 配列として読み取ります。
        /// </summary>
        /// <returns></returns>
        public static long[] ReadlongArray()
        {
            return ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
        }

        /// <summary>
        /// <see cref="IEnumerable{T}"/>の各要素を並べてコンソールに出力します。各要素の間には半角スペースが一つ入ります。
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="ts"></param>
        public static void WriteToConsole<T>(this IEnumerable<T> ts)
        {
            StringBuilder stringBuilder = new StringBuilder();
            foreach (T t in ts)
            {
                stringBuilder.Append(t.ToString());
                stringBuilder.Append(" ");
            }
            stringBuilder.Remove(stringBuilder.Length - 1, 1);
            Console.WriteLine(stringBuilder.ToString());
        }
    }
}