// Author:   old_school
// Created:  18.04.2021 17:30:11

#include<bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx,avx2,fma") 
#pragma GCC optimization ("unroll-loops")
using namespace std;
#define lld               long long int
#define ld                long double
#define pb                push_back
#define ppb               pop_back 
#define F                 first
#define S                 second
#define nl                '\n'
#define YES               cout<<"YES";
#define NO                cout<<"NO";
#define all(c)            (c).begin(),(c).end()
#define rall(c)           (c).rbegin(),(c).rend()
#define sz(c)             (c).size()
#define tr(x,a)           for(auto &a : x)
#define psnt(x,a)         (x).find(a)!=(x).end()
#define vpsnt(x,a)        find(all(x),a)!=(x).end()
#define MOD               1000000007
#define tod               (long long)1e5
#define pi                3.14159265358979323844
#define itr(i,a,b)        for(lld i=a;i<=b;i++)
#define itrn(i,a,b)       for(lld i=a;i>=b;i--)
#define iot(n)            for(lld i=0;i<n;i++)
#define jot(n)            for(lld j=0;j<n;j++)
#define pls(n,arr)        lld arr[n]; iot(n)  cin>>arr[i];

typedef pair<lld,lld>     pii;
typedef pair<string,lld>  psi;

template <typename T>
bool mycomp(T x,T y){ 
   return (x==y);  //give your condition here
}
bool paircomp(const pair<lld,lld> &x,const pair<lld,lld> &y){ 
return x.second<y.second;
}

void solve(){
   lld a,b; cin>>a>>b;
   vector<lld> A,B;
   lld r=1;
   lld za=a,zb=b;
   lld sa=0,sb=0;
   while(za--) sa+=r,A.pb(r++);
   r=-1;
   while(zb--) sb+=abs(r),B.pb(r--);
   if(sa>sb){
   	B[b-1]-=(sa-sb);
   }
   else if(sa<sb){
   	A[a-1]+=(sb-sa);
   }
   for(auto &p:A) cout<<p<<" ";
   for(auto &p:B) cout<<p<<" ";
}
int main(){
       ios_base::sync_with_stdio(false);
             cin.tie(0);
            cout.tie(0);
      lld t=1; //cin>>t;  
      while(t--){
            solve();
            cout<<endl;
      }
}


#include<bits/stdc++.h>
#define ll long long int
#define fab(a,b,i) for(int i=a;i<b;i++)
#define db double
#define endl "\n"
#define f first
#define se second
#define MOD 1000000007
#define quick ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
ll add(ll x, ll y) {ll res = x + y; return (res >= MOD ? res - MOD : res);}
ll mul(ll x, ll y) {ll res = x * y; return (res >= MOD ? res % MOD : res);}
ll sub(ll x, ll y) {ll res = x - y; return (res < 0 ? res + MOD : res);}
ll power(ll x, ll y) {ll res = 1; x %= MOD; while (y) {if (y & 1)res = mul(res, x); y >>= 1; x = mul(x, x);} return res;}
ll mod_inv(ll x) {return power(x, MOD - 2);}

using namespace std;
ll a[10000000],b[10000000];
int main()
{ 
	quick;
#ifndef ONLINE_JUDGE
    freopen("C:/coding/input.txt", "r", stdin);
    freopen("C:/coding/output.txt", "w", stdout);
#endif
	
		ll m,h;
		string s;
		cin>>m>>h;
		if(h%m==0)
			cout<<"Yes"<<endl;
		else
			cout<<"No"<<endl;

	
	
	

 cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
	return 0;
}