import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int z = sc.nextInt(); boolean flag = false; if (n == 1) { flag = (z != 1); } else if (n == 2) { for (int i = 1; i < z; i++) { for (int j = i; i * i + j * j <= z * z; j++) { if (i * i + j * j == z * z) { flag = true; } } } } else { flag = false; } if (flag) { System.out.println("Yes"); } else { System.out.println("No"); } } }