using System; using System.Collections.Generic; using System.Linq; namespace KnightSanpo_CS { class Program { static void Main(string[] args) { Solution mysol = new Solution(); if (mysol.Solve()) Console.WriteLine("YES"); else Console.WriteLine("NO"); } } class Solution { static Vector[] Moves = { new Vector(1, 2), new Vector(2, 1), new Vector(2, -1), new Vector(1, -2), new Vector(-1, -2), new Vector(-2, -1), new Vector(-2, 1), new Vector(-1, 2) }; Vector Destination; static int SDThreshold = 45; public bool Solve() { if (Destination.SquareDistance > SDThreshold || Math.Abs(Destination.X) > 8 || Math.Abs(Destination.Y) > 8) { return false; } else if (Destination.SquareDistance <= 1 || Destination.SquareDistance == 5 || Destination.SquareDistance == 20 || Destination.SquareDistance == SDThreshold) { return true; } else { Queue q = new Queue(); q.Enqueue(new Vector(0, 0)); while (q.Count() != 0) { Vector loc = q.Dequeue(); foreach (Vector m in Moves) { Vector moved = loc + m; moved.n = loc.n + 1; if (moved == Destination) { Console.WriteLine("{0}, {1}, {2}, {3}", loc.X, loc.Y, moved.X, moved.Y); return true; } else { if (!q.Contains(moved) && moved.n <=2) { q.Enqueue(moved); } } } } return false; } } public Solution() { int[] xy = ria(); Destination = new Vector(xy[0], xy[1]); } static String rs() { return Console.ReadLine(); } static int ri() { return int.Parse(Console.ReadLine()); } static long rl() { return long.Parse(Console.ReadLine()); } static double rd() { return double.Parse(Console.ReadLine()); } static String[] rsa() { return Console.ReadLine().Split(' '); } static int[] ria() { return Console.ReadLine().Split(' ').Select(e => int.Parse(e)).ToArray(); } static long[] rla() { return Console.ReadLine().Split(' ').Select(e => long.Parse(e)).ToArray(); } static double[] rda() { return Console.ReadLine().Split(' ').Select(e => double.Parse(e)).ToArray(); } } struct Vector { public int X, Y; public int n; public Vector(int x, int y) { X = x; Y = y; n = 0; } public Vector(Vector a) { X = a.X; Y = a.Y; n = a.n; } public static Vector operator +(Vector a, Vector b) { Vector c = new Vector(a.X + b.X, a.Y + b.Y); return c; } public static Vector operator -(Vector a, Vector b) { Vector c = new Vector(a.X - b.X, a.Y - b.Y); return c; } public static Vector operator -(Vector a) { Vector c = new Vector(-a.X, -a.Y); return c; } public static bool operator ==(Vector a, Vector b) { return (a.X == b.X && a.Y == b.Y); } public static bool operator !=(Vector a, Vector b) { return (a.X != b.X || a.Y != b.Y); } public int SquareDistance { get { return (X * X + Y * Y); } } } }