Given a weighted directed graph, we define the shortest path as the path who has the smallest length among all the path connecting the source vertex to the target vertex. And if two path is said to be non-overlapping, it means that the two path has no common edge. So, given a weighted directed graph, a source vertex and a target vertex, we are interested in how many non-overlapping shortest path could we find out at most.


Input consists of multiple test cases. The first line of each test case, there is an integer number N ( \(1\le N\le 100\) ), which is the number of the vertices. Then follows an \(N\times N\) matrix, represents the directed graph. Each element of the matrix is either non-negative integer, denotes the length of the edge, or -1, which means there is no edge. At the last, the test case ends with two integer numbers S and T ( \(0\le S, T\le N-1\) ), that is, the starting and ending points. Process to the end of the file.


For each test case, output one line, the number of the the non-overlapping shortest path that we can find at most, or "inf" (without quote), if the starting point meets with the ending.

Sample Input:

Sample Output:


直接跑Floyd然后如果一条边(u, v)满足 \(d[S][u]+W[u][v]+d[v][T]=d[S][T]\) 那么加入网络流图中,边权为1.