#include<iostream>
#include<cstdio>
using namespace std;
#define fo(i,a,b) for(int i=a;i<=b;++i)
#define fod(i,a,b) for(int i=a;i>=b;--i)
#define LL long long
#define p 998244353
int n,m,er[21];
int jc[10001],ny[10001];
int f[20][5001];
int ksm(int x,int y){
	if(x==1)return y;
	LL u=ksm(x/2,y);
	u=(LL)u*u%p;
	if(x&1)u=(LL)u*y%p;
	return u;
}
LL ans=0;
int read(){
	int u=0;
	char c=getchar();
	while(c>'9'||c<'0'){
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		u=u*10+c-48;
		c=getchar();
	}
	return u;
}
int C(int x,int y){
	if(y>x)return 0;
	return (LL)jc[x]*ny[y]%p*ny[x-y]%p;
}
int main(){
	n=read();
	m=read();
	jc[0]=ny[0]=1;
	fo(i,1,m+n)jc[i]=(LL)jc[i-1]*i%p;
	ny[n+m]=ksm(p-2,jc[n+m]);
	fod(i,n+m,2)ny[i-1]=(LL)ny[i]*i%p;
	er[0]=1;
	fo(i,1,20)er[i]=er[i-1]*2;
	f[0][0]=1;
	fo(i,1,20){
		if(er[i]<=m){
			fo(j,0,m){
				if(f[i-1][j]){
					fo(k,0,(m-j)/er[i]){
//						if(j+k*er[i]==20&&i==3)cout<<j<<endl;
						f[i][j+k*er[i]]=(f[i][j+k*er[i]]+(LL)C(n,2*k)*f[i-1][j]%p)%p;
					}
				}
			}
//			fo(j,0,m)if(f[i][j])cout<<i<<" "<<j<<" "<<f[i][j]<<endl;
			ans=f[i][m];
		}
	}
	printf("%lld",ans);
	return 0;
}
#include <bits/stdc++.h>

using namespace std;

#define inf          1e15
#define mod          1000000007
#define N            100001
#define ll           long long int
#define vint         vector<int>
#define vll          vector<ll>
#define vstr         vector<string>
#define vvint        vector<vector<int> >
#define vvll         vector<vector<ll> >
#define vint_pair    vector<pair<int,int> >
#define input(arr)   for(auto &x:arr) cin>>x;
#define all(x)       (x).begin(), (x).end()
#define rall(x)      (x).rbegin(), (x).rend()

int main() {
    int a,b; cin>>a>>b;
    int mul = 1;
    if(a<b){
        int tmp = a;
        a = b;
        b = tmp;
        mul = -1;
    }
    for(int i=1;i<=a;++i){
        cout<<(i*mul)<<" ";
    }
    int m = (a*(a+1))/2;
    int n = (b*(b-1))/2;
    for(int i=1;i<b;++i){
        cout<<(-i * mul)<<" ";
    }
    cout<<(n-m)*mul;
}
