#include<iostream> using namespace std; int main(){ long long m,k; cin>>m>>k; if(m%(k*3)==0) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }