#OLD364. Elliott and Det

Elliott and Det

Description

Recently, Elliott became interested in programming. Under the guidance of the teacher, he began to practice programming. At first he encountered a difficult problem, gave a determinant(Det(aija_{ij})), and asked for his algebraic remainder(AijA_{ij}).This question puzzled him for a long time, so he posted a blog on the Internet: given a Det(aija_{ij}) , calculate one of the algebraic remainders(AijA_{ij}).If you know the solution of this question, are you willing to help him?

Format

Input

First contains an integer NN, indicating N-order determinant. (1<N10)(1< N\leq 10)

Next NN lines contains NN integers which describe the N-order matrix.

The N+2N+2 line contains two integers i,ji,j, the positions of algebraic remainders(AijA_{ij}) to be computed.(0<aij100)(0 <a_{ij} \leq 100)

Output

Print AijA_{ij} of module of 109+710^9+7.

Samples

2
1 2
3 4
1 2
-3

Hint

The row ii and column jj are removed from det(AijA_{ij}), and the (n1)2(n-1)^2 elements are left in the same order as before, an n-1-order det(MijM_{ij})

$ Det= \begin{vmatrix} 1 & 2 \\\ 3 & 4 \\\ \end{vmatrix},M_{12}= 3, A_{12}=(-1)^{1+2}M_{12}=-3 $