#include <bits/stdc++.h>
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  int c = b;
  int i = 0;
  while (c > 0) {
    c = c / 10;
    i++;
  }
  int j;
  for (j = 0; j < i; j++) {
    a = a * 10;
  }
  int ans = 0;
  ans = a + b;
  for (j = 1; j < ans; j++) {
    if (ans % j * j == 0 && ans / j * j == 1) {
      printf("Yes");
    }
  }
  if (j == ans) {
    printf("No");
  }
  return 0;
}
