#include #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; typedef long long int ll; int main() { ll A,B; cin >> A >> B; cout << (abs(B)%abs(A) ? "NO" : "YES") << endl; return 0; }