class ModInteger attr_reader :fac, :inv, :finv, :mod def initialize(n, mod: MOD) @mod = mod @fac = [1, 1] @inv = [1, 1] @finv = [1, 1] (2..n).each do |i| @fac[i] = fac[i - 1] * i % mod @inv[i] = mod - inv[mod % i] * (mod / i) % mod @finv[i] = finv[i - 1] * inv[i] % mod end end def combination(n, k) return 0 if n < k return 0 if n < 0 || k < 0 fac[n] * (finv[k] * finv[n - k] % mod) % mod end def permutation(n, k = n) return 0 if n < k return 0 if n < 0 || k < 0 fac[n] * (finv[n - k] % mod) % mod end def repeated_combination(n, k) combination(n + k - 1, k) end end def mod_permutation(n, mod) (1..n).inject(1) { |e, x| e = e * x % mod } end MOD = 998_244_353 X, Y, Z, W = gets.split.map(&:to_i) mi = ModInteger.new(600_010, mod: MOD) all = X + Y - Z - W if Z == 0 v1 = mi.combination(all - 1, X - 1) * mod_permutation(X, MOD) v2 = mi.combination(Y, W) * mod_permutation(Y - W, MOD) puts v1 * v2 % MOD else v1 = mi.combination(all - 1, Y - 1) * mod_permutation(Y, MOD) v2 = mi.combination(X, Z) * mod_permutation(X - Z, MOD) puts v1 * v2 % MOD end