#include <bits/stdc++.h>

#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef double ld;

template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }

const i64 P = 998244353;
const int maxn = 3100;
i64 dp[maxn][maxn];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;
#ifdef LOCAL_DEFINE
    freopen("input.txt", "rt", stdin);
#endif

    dp[0][0] = 1;
    for1(i, maxn - 1) ford(j, maxn) {
        if (j) dp[i][j] = dp[i - 1][j - 1];
        if (2 * j < maxn) (dp[i][j] += dp[i][2 * j]) %= P;
    }

    int n, k;
    cin >> n >> k;
    cout << dp[n][k] << '\n';

#ifdef LOCAL_DEFINE
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
    return 0;
}

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <algorithm>
#include <cstring>
#include <queue>
#include <set>
#include <cmath>

//========================[define]=======================

#define ll long long
//#define File
#define ull unsigned long long
#define loop(i,a,b,k) for(register int i = a;i<=b;i+=k)
#define ii(a) scanf("%d",&a);
#define oi(a) printf("%d",a);
#define ic(a) scanf("%c",&a);
#define oc(a) printf("%c",a);
#define ill(a) scanf("%lld",&a);
#define oll(a) printf("%lld",a);
#define pl() printf("\n");
#define pk() printf(" ");
#define it (int)
#define db (double)
#define lng (long long)
#define debug(x) cerr<<#x<<" = "<<x<<'\n';

//=========================[const]=======================

using namespace std;

const int N=1000+10;
const int M=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;

//================================[begin]=====================

int add,Minus;

//=================================[end]======================

int
main()
{
	#ifdef File
		freopen("in.in","r", stdin);
		freopen("out.out","w", stdout);
	#endif
	scanf("%d%d",&add,&Minus);
	printf("%d %d",(add + Minus)/2,(add - Minus)/2);
	return 0;
}