#include <bits/stdc++.h>
int main(int argc, char** argv) {
  int a;
  int b;
  int i;
  int num;
  int div;
  int mod;
  scanf("%d %d", &a, &b);
  div = b;
  i = 0;
  while (div > 0) {
    div = div / 10;
    i++;
  }
  num = a;
  for (; i > 0; i--) {
    num = num * 10;
  }
  num = num + b;
  printf("%d\n", num);
  i = 2;
  while (i <= num / 2) {
    div = num / i;
    mod = num % i;
    if (mod == 0) {
      if (div == i) {
        printf("Yes");
        return 0;
      }
    }
    i++;
  }
  printf("No");
  return 0;
}
