#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
using namespace std;

int main(void){
    int a,b;
    scanf("%d%d", &a, &b);
    if(b%a==0){
        printf("Yes\n");
    } else {
        printf("No\n");
    }
       return 0;
    
}


#include<bits/stdc++.h>
#define forn(i,s,t) for(int i=(s);i<=(t);++i)
using namespace std;
typedef long long LL ;
LL S,P;
int main() {
	scanf("%lld%lld",&S,&P);
	LL TMP;
	for(LL i=1;i*i<=P;++i) if(P%i == 0) {
		TMP = P/i;
		if(TMP + i == S) {
			puts("Yes");
			return 0;
		}
	}
	puts("No");
	return 0;
}

// A+B = S;
// A*B = P;
// A = S-B
// (S-B)*B = P
// P + (B-S) * B = 0
// B^2 - S*B + P = 0;
// delta = S^2-4*P