import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();

		final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b));

		String result = "No";
		for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		}

		System.out.print(result);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();

		final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b));

		String result = "No";
		for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		}

		System.out.print(result);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();

		final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b));

		String result = "No";
		for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		}

		System.out.print(result);

	} main {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();

		final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b));

		String result = "No";
		for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		}

		System.out.print(result);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc final int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b)); num Integer.valueOf(String.valueOf(a) + String.valueOf(b)) Integer.valueOf Integer String.valueOf(a) + String.valueOf(b) String.valueOf(a) String.valueOf String a String.valueOf(b) String.valueOf String b String result = "No"; result "No" for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		} int i = 1; int i = 1; i 1 i <= num i num i++ i++ i {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		} {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		} if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			} num % i > 0 num % i num i 0 {
				continue;
			} continue; if (i == num / i) {
				result = "Yes";
				break;
			} i == num / i i num / i num i {
				result = "Yes";
				break;
			} result = "Yes" result "Yes" break; System.out.print(result) System.out.print System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();

		final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b));

		String result = "No";
		for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		}

		System.out.print(result);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();

		final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b));

		String result = "No";
		for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		}

		System.out.print(result);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();

		final int num = Integer.valueOf(String.valueOf(a) + String.valueOf(b));

		String result = "No";
		for (int i = 1; i <= num; i++) {
			if (num % i > 0) {
				continue;
			} else if (i == num / i) {
				result = "Yes";
				break;
			}
		}

		System.out.print(result);

	}

}
