Problem: We have a grid with A horizontal rows and B vertical columns, with the squares painted white. On this grid, we will repeatedly apply the following operation:

* Assume that the grid currently has a horizontal rows and b vertical columns. Choose "vertical" or "horizontal".
* If we choose "vertical", insert one row at the top of the grid, resulting in an (a+1) \times b grid.
* If we choose "horizontal", insert one column at the right end of the grid, resulting in an a \times (b+1) grid.
* Then, paint one of the added squares black, and the other squares white.



Assume the grid eventually has C horizontal rows and D vertical columns. Find the number of ways in which the squares can be painted in the end, modulo 998244353.

Constraints

* 1 \leq A \leq C \leq 3000
* 1 \leq B \leq D \leq 3000
* A, B, C, and D are integers.

Input

Input is given from Standard Input in the following format:


A B C D


Output

Print the number of ways in which the squares can be painted in the end, modulo 998244353.

Examples

Input

1 1 2 2


Output

3


Input

2 1 3 4


Output

65


Input

31 41 59 265


Output

387222020

Solution (in JAVA):

Solution:
import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	int A, B, C, D;
	long MOD = 998244353L;
	long[][] cell;

	Main(BufferedReader in) throws IOException {
		String[] tokens = in.readLine().split(" ");
		A = Integer.parseInt(tokens[0]);
		B = Integer.parseInt(tokens[1]);
		C = Integer.parseInt(tokens[2]);
		D = Integer.parseInt(tokens[3]);
		cell = new long[C][D];
		for (int i = 0; i < C; ++i) {
			Arrays.fill(cell[i], 0L);
		}
		cell[A - 1][B - 1] = 1L;
		for (int i = A; i < C; ++i) {
			cell[i][B - 1] = cell[i - 1][B - 1] * B % MOD;
		}
		for (int i = B; i < D; ++i) {
			cell[A - 1][i] = cell[A - 1][i - 1] * A % MOD;
		}
	}

	void calc() {
		for (int i = A; i < C; ++i) {
			for (int j = B; j < D; ++j) {
				// このマスが白の場合: 例えば，左のパターン * 下一列のいずれかが黒
				cell[i][j] = cell[i - 1][j] * (long) j;
				cell[i][j] %= MOD;
				cell[i][j] += cell[i][j - 1] * (long) i;
				cell[i][j] %= MOD;
				long val = cell[i - 1][j - 1] * (long) i;
				val %= MOD;
				val *= (long) j;
				val %= MOD;
				cell[i][j] -= val;
				cell[i][j] += MOD;
				cell[i][j] %= MOD;
				cell[i][j] += cell[i - 1][j];
				cell[i][j] %= MOD;
				cell[i][j] += cell[i][j - 1];
				cell[i][j] %= MOD;
			}
		}
	}

	void showCell() {
		for (int i = 0; i < C; ++i) {
			for (int j = 0; j < D; ++j) {
				System.out.print(cell[i][j] + " ");
			}
			System.out.println("");
		}
	}

	void showResult() {
		System.out.println(cell[C - 1][D - 1]);
		// showCell();
	}
}