#include int main(void){ int a,b; std::cin>>a>>b; std::cout<<(b%a?"NO":"YES")<<"\n"; return 0; }