#include int ri() { int n; scanf("%d", &n); return n; } template struct NTT { int get_mod() { return mod; } int pow(int a, int b) { int res = 1; for (; b; b >>= 1) { if (b & 1) res = (int64_t) res * a % mod; a = (int64_t) a * a % mod; } return res; } int inv(int i) { return pow(i, mod - 2); } void ntt(std::vector &a, bool inverse) { int n = a.size(); assert((n & -n) == n); int h = pow(proot, (mod - 1) / n); if (inverse) h = inv(h); for (int i = 0, j = 1; j < n - 1; j++) { for (int k = n >> 1; k > (i ^= k); k >>= 1); if (j < i) std::swap(a[i], a[j]); } for (int i = 1; i < n; i <<= 1) { int base = pow(h, n / i / 2); int w = 1; std::vector ws(i); for (int j = 0; j < i; j++) ws[j] = w, w = (int64_t) w * base % mod; for (int j = 0; j < n; j += i << 1) { for (int k = 0; k < i; k++) { int u = a[k + j]; int d = (int64_t) a[k + j + i] * ws[k] % mod; a[k + j] = u + d >= mod ? u + d - mod : u + d; a[k + j + i] = d > u ? u + mod - d : u - d; } } } if (inverse) { int ninv = inv(a.size()); for (auto &i : a) i = (int64_t) i * ninv % mod; } } std::vector conv(const std::vector &a_, const std::vector &b_) { if (!a_.size() || !b_.size()) return {}; std::vector a = a_, b = b_; size_t size = 1; for (; size < a_.size() + b_.size(); size <<= 1); a.resize(size); b.resize(size); ntt(a, false); ntt(b, false); for (size_t i = 0; i < size; i++) a[i] = (int64_t) a[i] * b[i] % mod; ntt(a, true); a.resize(a_.size() + b_.size() - 1); return a; } std::vector self_conv(std::vector a) { if (!a.size()) return {}; size_t n_ = a.size(); size_t size = 1; for (; size < n_ + n_; size <<= 1); a.resize(size); ntt(a, false); for (auto &i : a) i = (int64_t) i * i % mod; ntt(a, true); a.resize(n_ + n_ - 1); return a; } }; template struct ModInt{ int x; ModInt () : x(0) {} ModInt (int64_t x) : x(x >= 0 ? x % mod : (mod - -x % mod) % mod) {} ModInt &operator += (const ModInt &p){ if ((x += p.x) >= mod) x -= mod; return *this; } ModInt &operator -= (const ModInt &p) { if ((x += mod - p.x) >= mod) x -= mod; return *this; } ModInt &operator *= (const ModInt &p) { x = (int64_t) x * p.x % mod; return *this; } ModInt &operator /= (const ModInt &p) { *this *= p.inverse(); return *this; } ModInt &operator ^= (int64_t p) { ModInt res = 1; for (; p; p >>= 1) { if (p & 1) res *= *this; *this *= *this; } return *this = res; } ModInt operator - () const { return ModInt(-x); } ModInt operator + (const ModInt &p) const { return ModInt(*this) += p; } ModInt operator - (const ModInt &p) const { return ModInt(*this) -= p; } ModInt operator * (const ModInt &p) const { return ModInt(*this) *= p; } ModInt operator / (const ModInt &p) const { return ModInt(*this) /= p; } ModInt operator ^ (int64_t p) const { return ModInt(*this) ^= p; } bool operator == (const ModInt &p) const { return x == p.x; } bool operator != (const ModInt &p) const { return x != p.x; } explicit operator int() const { return x; } ModInt &operator = (const int p) { x = p; return *this;} ModInt inverse() const { int a = x, b = mod, u = 1, v = 0, t; while (b > 0) { t = a / b; a -= t * b; std::swap(a, b); u -= t * v; std::swap(u, v); } return ModInt(u); } friend std::ostream & operator << (std::ostream &stream, const ModInt &p) { return stream << p.x; } friend std::istream & operator >> (std::istream &stream, ModInt &a) { int64_t x; stream >> x; a = ModInt(x); return stream; } }; template struct MComb { using mint = ModInt; std::vector fact; std::vector inv; MComb (int n) { // O(n + log(mod)) fact = std::vector(n + 1, 1); for (int i = 1; i <= n; i++) fact[i] = fact[i - 1] * mint(i); inv.resize(n + 1); inv[n] = fact[n] ^ (mod - 2); for (int i = n; i--; ) inv[i] = inv[i + 1] * mint(i + 1); } mint ncr(int n, int r) { return fact[n] * inv[r] * inv[n - r]; } mint npr(int n, int r) { return fact[n] * inv[n - r]; } mint nhr(int n, int r) { assert(n + r - 1 < (int) fact.size()); return ncr(n + r - 1, r); } }; #define MOD 998244353 typedef ModInt mint; int main() { int n = ri(); int k = ri(); MComb<998244353> com(k); std::vector r0(k + 1); std::vector r1(k + 1); for (int i = 0; i <= k; i++) r0[i] = (int) ((mint(i) ^ n) * com.inv[i]); for (int i = 0; i <= k; i++) r1[i] = (int) (com.inv[i] * ((i & 1) ? -1 : 1)); auto tmp = NTT<998244353, 3>().conv(r0, r1); mint res = 0; for (int i = 1; i <= k; i += 2) res += mint(tmp[k - i]) * com.fact[k] * com.inv[i]; std::cout << res << std::endl; return 0; }