#include using namespace std; int main(){ long long a, b; cin >> a >> b; if (a % b == 0){ cout << "No" << endl; return 0; } while (b % 2 == 0){ b /= 2; } while (b % 5 == 0){ b /= 5; } if (b != 1){ cout << "Yes" << endl; } else { cout << "No" << endl; } }