#include using namespace std; typedef int64_t lint; int main() { lint a,b;cin>>a>>b; if(!a||b%a!=1){ cout<<"NO"<