#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); long long N,P; cin >> N >> P; if(N == 0){cout << "No\n"; return 0;} if((N+1)%P == 0){cout << "Yes\n"; return 0;} if((P-1)%((N+1)%P) == 0) cout << "Yes\n"; else cout << "No\n"; }