#include #include int main() { double a, b; scanf("%lf%lf", &a, &b); if (b > 0) { for (; b > 1; b -= 1); } else { for (; b < -1; b += 1); } double c = pow(a, b); if (floor(c) == ceil(c)) printf("Yes\n"); else printf("No\n"); return 0; }