Problem: Ikta has an extraordinary feeling for undirected graphs. Ikta likes the undirected graph G and its two-point s, t pair (G, s, t) that has the greatest "beauty". The "beauty" of a pair (G, s, t) is the edge e = \\ {u, v \\} (u and v are two different points of G), and the shortest path from s to t in G. Is the number of things whose length is greater than the length of the shortest path from s to t in the undirected graph with g plus e.

Your job is to write a program that seeks its "beauty" given a pair (G, s, t).



Input

The input is given in the following format.

> N M s t
> x1 y1
> ...
> xi yi
> ...
> xM yM
>

First, the number of vertices, the number of edges, and the integers N, M, s, t representing the two vertices of the undirected graph are input. From the 2nd line to the M + 1th line, two vertices connected by edges are input. (However, let the set of G vertices be \\ {1, ..., N \\}.)

Constraints

Each variable being input satisfies the following constraints.

* 2 ≤ N ≤ 100,000
* 1 ≤ M ≤ 300,000
* 1 ≤ s, t, xi, yi ≤ N
* Different from s and t
* Guaranteed to reach t from s

Output

When the given graph is G, output the "beauty" of the set (G, s, t) in one line.

Examples

Input

3 2 1 3
1 2
2 3


Output

1


Input

9 8 7 8
2 6
4 9
8 6
9 2
3 8
1 8
8 5
7 9


Output

7


Input

4 3 1 4
1 2
3 4
4 1


Output

0


Input

9 7 8 9
9 6
6 5
3 6
3 7
2 5
8 5
1 4


Output

2

Solution (in JAVA):

Solution:
import java.util.*;

class Main {
	public class T{
		int a,b,c;
		T(int a,int b,int c){
			this.a = a;
			this.b = b;
			this.c = c;
		}
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int s = sc.nextInt()-1;
		int t = sc.nextInt()-1;
		ArrayList<ArrayList<Integer>> g = new ArrayList<ArrayList<Integer>>();
		for(int i = 0 ; i < N ; i++)
			g.add(new ArrayList<Integer>());
		for(int i = 0 ; i < M ; i++){
			int a = sc.nextInt()-1;
			int b = sc.nextInt()-1;
			g.get(a).add(b);
			g.get(b).add(a);
		}
		ArrayDeque<Integer> Q = new ArrayDeque<Integer>();
		int[] shortest1 = new int[N+1];
		int[] shortest2 = new int[N+1];
		
		int[] counter1 = new int[N+1];
		int[] counter2 = new int[N+1];
		
		Arrays.fill(shortest1,N);
		Arrays.fill(shortest2,N);
		Q.offer(s);
		shortest1[s] = 0;
		while( Q.size() > 0 ){
			int q = Q.poll();
			counter1[shortest1[q]]++;
			//System.out.println(q+1+" "+shortest1[q]);
			for( int to : g.get(q) ){
				if( shortest1[to] == N ){
					shortest1[to] = shortest1[q] + 1;
					Q.offer(to);
				}
			}
		}
		Q.offer(t);
		shortest2[t] = 0;
		while( Q.size() > 0 ){
			int q = Q.poll();
			counter2[shortest2[q]]++;
			//System.out.println(q+1+" "+shortest2[q]);
			for( int to : g.get(q) ){
				if( shortest2[to] == N ){
					shortest2[to] = shortest2[q] + 1;
					Q.offer(to);
				}
			}
		}
		//System.out.println("");

		int maximum = shortest1[t];
		long ans = 0;
		//for(int i = 0 ; i <= maximum ; i++){
		//	System.out.println(i+" "+counter[i]);
		//}
		for(int i = 0 ; i+2 <= maximum ; i++){

			ans += (long) counter1[i] * counter2[maximum-(i+2)];
		}
		System.out.println(ans);
		return;
	}
}