#![allow(non_snake_case, unused_imports, unused_must_use)] use std::io::{self, prelude::*}; use std::str; fn main() { let (stdin, stdout) = (io::stdin(), io::stdout()); let mut scan = Scanner::new(stdin.lock()); let mut out = io::BufWriter::new(stdout.lock()); macro_rules! input { ($T: ty) => { scan.token::<$T>() }; ($T: ty, $N: expr) => { (0..$N).map(|_| scan.token::<$T>()).collect::>() }; } let H = input!(usize); let W = input!(usize); let A = input!(usize); let B = input!(usize); let he = { let base = 200_005; let mut bit = BinaryIndexedTree::new(400_010); bit.add(base, MInt998244353::from(A)); for d in 1..A { bit.add(base - d, MInt998244353::from(A - d)); bit.add(base + d, MInt998244353::from(A - d)); } let mut exp = MInt998244353::default(); for i in 0..=H - A { let s = bit.sum(base - i..=base - i + H - A); exp += s; } exp /= MInt998244353::from((H - A + 1) * (H - A + 1)); exp }; let we = { let base = 200_005; let mut bit = BinaryIndexedTree::new(400_010); bit.add(base, MInt998244353::from(B)); for d in 1..B { bit.add(base - d, MInt998244353::from(B - d)); bit.add(base + d, MInt998244353::from(B - d)); } let mut exp = MInt998244353::default(); for i in 0..=W - B { let s = bit.sum(base - i..=base - i + W - B); exp += s; } exp /= MInt998244353::from((W - B + 1) * (W - B + 1)); exp }; let ans = MInt998244353::from(2 * A * B) - he * we; writeln!(out, "{}", ans); } pub struct BinaryIndexedTree { tree: Vec, } impl> BinaryIndexedTree { /// self = [0; size] pub fn new(size: usize) -> Self { return Self { tree: vec![T::default(); size + 1], }; } /// self[i] <- self[i] + w pub fn add(&mut self, i: usize, w: T) { self._inner_add(i + 1, w); } /// return Σ_{j ∈ [0, i]} self[j] pub fn prefix_sum(&self, i: usize) -> T { self._inner_sum(i + 1) } /// return Σ_{j ∈ range} self[j] pub fn sum>(&self, range: R) -> T { let left = match range.start_bound() { std::ops::Bound::Included(&l) => l, std::ops::Bound::Excluded(&l) => l + 1, std::ops::Bound::Unbounded => 0, }; let right = match range.end_bound() { std::ops::Bound::Included(&r) => r, std::ops::Bound::Excluded(&r) => r - 1, std::ops::Bound::Unbounded => self.tree.len() - 2, }; if left == 0 { return self.prefix_sum(right); } else { return self.prefix_sum(right) - self.prefix_sum(left - 1); } } fn _inner_add(&mut self, mut i: usize, w: T) { while i < self.tree.len() { self.tree[i] += w; i += i & i.wrapping_neg(); } } fn _inner_sum(&self, mut i: usize) -> T { let mut ret = T::default(); while i > 0 { ret += self.tree[i]; i -= i & i.wrapping_neg(); } return ret; } } pub type MInt998244353 = ModInt<998244353>; #[derive(Clone, Copy, Eq, PartialEq, Debug)] pub struct ModInt { value: u32, } impl ModInt

{ pub fn value(&self) -> u32 { assert!(self.value < P); return self.value; } pub fn new() -> Self { return Self { value: 0 }; } pub fn from_raw(x: u32) -> Self { return Self { value: x }; } pub fn inv(&self) -> Self { pub fn ext_gcd(a: isize, b: isize) -> (isize, isize) { let mut a_k = a; let mut b_k = b; let mut q_k = a_k / b_k; let mut r_k = a_k % b_k; let mut x_k = 0; let mut y_k = 1; let mut z_k = 1; let mut w_k = -q_k; a_k = b_k; b_k = r_k; while r_k != 0 { q_k = a_k / b_k; r_k = a_k % b_k; a_k = b_k; b_k = r_k; let nx = z_k; let ny = w_k; let nz = x_k - q_k * z_k; let nw = y_k - q_k * w_k; x_k = nx; y_k = ny; z_k = nz; w_k = nw; } (x_k, y_k) } let val = self.value() as isize; let ret = ext_gcd(val, P as isize).0; return Self::from(ret); } pub fn pow(&self, mut x: u64) -> Self { let mut ret = ModInt::from_raw(1); let mut a = self.clone(); while x > 0 { if (x & 1) == 1 { ret = ret * a; } a *= a; x >>= 1; } return ret; } } impl std::ops::Add for ModInt

{ type Output = Self; fn add(self, rhs: Self) -> Self::Output { let mut ret = self.value() + rhs.value(); if ret >= P { ret -= P; } return Self::from_raw(ret); } } impl std::ops::AddAssign for ModInt

{ fn add_assign(&mut self, rhs: Self) { self.value = (self.clone() + rhs).value(); } } impl std::ops::Sub for ModInt

{ type Output = Self; fn sub(self, rhs: Self) -> Self::Output { if self.value() >= rhs.value() { return Self::from_raw(self.value() - rhs.value()); } else { return Self::from_raw(P + self.value() - rhs.value()); } } } impl std::ops::SubAssign for ModInt

{ fn sub_assign(&mut self, rhs: Self) { self.value = (self.clone() - rhs).value(); } } impl std::ops::Mul for ModInt

{ type Output = Self; fn mul(self, rhs: Self) -> Self::Output { let ret = self.value() as usize * rhs.value() as usize; return Self::from(ret); } } impl std::ops::MulAssign for ModInt

{ fn mul_assign(&mut self, rhs: Self) { self.value = (self.clone() * rhs).value(); } } impl std::ops::Div for ModInt

{ type Output = Self; fn div(self, rhs: Self) -> Self::Output { self * rhs.inv() } } impl std::ops::DivAssign for ModInt

{ fn div_assign(&mut self, rhs: Self) { self.value = (self.clone() / rhs).value(); } } impl std::ops::Neg for ModInt

{ type Output = Self; fn neg(self) -> Self::Output { let value = self.value(); return Self { value: P - value }; } } macro_rules! int_from_impl { ($($t: ty), *) => { $( #[allow(unused_comparisons)] impl From<$t> for ModInt

{ fn from(value: $t) -> Self { if value >= 0 { Self { value: (value % P as $t) as u32, } } else { let rem = P as $t + value % P as $t; Self { value: rem as u32 } } } } ) * }; } int_from_impl!(usize, isize, u64, i64, u32, i32, u128, i128); impl Default for ModInt

{ fn default() -> Self { Self { value: 0 } } } impl std::fmt::Display for ModInt

{ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.value) } } struct Scanner { reader: R, buf_str: Vec, buf_iter: str::SplitWhitespace<'static>, } impl Scanner { fn new(reader: R) -> Self { Self { reader, buf_str: vec![], buf_iter: "".split_whitespace(), } } fn token(&mut self) -> T { loop { if let Some(token) = self.buf_iter.next() { return token.parse().ok().expect("Failed parse"); } self.buf_str.clear(); self.reader .read_until(b'\n', &mut self.buf_str) .expect("Failed read"); self.buf_iter = unsafe { let slice = str::from_utf8_unchecked(&self.buf_str); std::mem::transmute(slice.split_whitespace()) } } } }