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