1042_E. Vasya and Magic Matrix
Vasya has got a magic matrix a of size n × m. The rows of the matrix are numbered from 1 to n from top to bottom, the columns are numbered from 1 to m from left to right. Let a_{ij} be the element in the intersection of the i-th row and the j-th column.

Vasya has also got a chip. Initially, the chip is in the intersection of the r-th row and the c-th column (that is, in the element a_{rc}). Vasya performs the following process as long as possible: among all elements of the matrix having their value less than the value of the element with the chip in it, Vasya randomly and equiprobably chooses one element and moves his chip to this element.

After moving the chip, he adds to his score the square of the Euclidean distance between these elements (that is, between the element in which the chip is now and the element the chip was moved from). The process ends when there are no elements having their values less than the value of the element with the chip in it.

Euclidean distance between matrix elements with coordinates (i_1, j_1) and (i_2, j_2) is equal to √{(i_1-i_2)^2 + (j_1-j_2)^2}.

Calculate the expected value of the Vasya's final score.

It can be shown that the answer can be represented as P/Q, where P and Q are coprime integer numbers, and Q not≡ 0~(mod ~ 998244353). Print the value P ⋅ Q^{-1} modulo 998244353.

Input

The first line of the input contains two integers n and m (1 ≤ n, m ≤ 1 000) — the number of rows and the number of columns in the matrix a.

The following n lines contain description of the matrix a. The i-th line contains m integers a_{i1}, a_{i2}, ..., a_{im} ~ (0 ≤ a_{ij} ≤ 10^9).

The following line contains two integers r and c (1 ≤ r ≤ n, 1 ≤ c ≤ m) — the index of row and the index of column where the chip is now.

Output

Print the expected value of Vasya's final score in the format described in the problem statement.

Examples

Input

1 4
1 1 2 1
1 3


Output

2


Input

2 3
1 5 7
2 3 1
1 2


Output

665496238

Note

In the first example, Vasya will move his chip exactly once. The expected value of the final score is equal to (1^2 + 2^2+ 1^2)/(3) = 2.
```python
import io, os
ns = iter(os.read(0, os.fstat(0).st_size).split()).__next__

MX = 10 ** 6
MOD = 998244353

n, m = int(ns()), int(ns())
a = [int(ns()) for i in range(n * m)]
s = (int(ns()) - 1) * m + int(ns()) - 1

inv = [1] * MX
for i in range(2, MX):
    inv[i] = -(MOD // i) * inv[MOD % i] % MOD

ind = sorted(list(range(n * m)), key=lambda i: a[i])
fsum = isum = i2sum = jsum = j2sum = cnt = done = i = 0
while i < n * m:
    j = i
    tmpf = 0
    while j < n * m and a[ind[i]] == a[ind[j]]:
        x, y = divmod(ind[j], m)
        f = (fsum + cnt * (x * x + y * y) + i2sum + j2sum - 2 * (x * isum + y * jsum)) * inv[cnt] % MOD
        if ind[j] == s:
            done = 1
            break
        tmpf += f
        j += 1
    if done: break
    for k in range(i, j):
        x, y = divmod(ind[k], m)
        isum += x
        i2sum += x * x
        jsum += y
        j2sum += y * y
    fsum = (fsum + tmpf) % MOD
    cnt += j - i
    i = j
print(f)
```