Little town Nsk consists of n junctions connected by m bidirectional roads. Each road connects two distinct junctions and no two roads connect the same pair of junctions. It is possible to get from any junction to any other junction by these roads. The distance between two junctions is equal to the minimum possible number of roads on a path between them.

In order to improve the transportation system, the city council asks mayor to build one new road. The problem is that the mayor has just bought a wonderful new car and he really enjoys a ride from his home, located near junction s to work located near junction t. Thus, he wants to build a new road in such a way that the distance between these two junctions won't decrease. 

You are assigned a task to compute the number of pairs of junctions that are not connected by the road, such that if the new road between these two junctions is built the distance between s and t won't decrease.

Input

The firt line of the input contains integers n, m, s and t (2 ≤ n ≤ 1000, 1 ≤ m ≤ 1000, 1 ≤ s, t ≤ n, s ≠ t) — the number of junctions and the number of roads in Nsk, as well as the indices of junctions where mayors home and work are located respectively. The i-th of the following m lines contains two integers ui and vi (1 ≤ ui, vi ≤ n, ui ≠ vi), meaning that this road connects junctions ui and vi directly. It is guaranteed that there is a path between any two junctions and no two roads connect the same pair of junctions.

Output

Print one integer — the number of pairs of junctions not connected by a direct road, such that building a road between these two junctions won't decrease the distance between junctions s and t.

Examples

Input

5 4 1 5
1 2
2 3
3 4
4 5


Output

0


Input

5 4 3 5
1 2
2 3
3 4
4 5


Output

5


Input

5 6 1 5
1 2
1 3
1 4
4 5
3 5
2 5


Output

3
// package endsem;
import java.util.*;
import java.lang.Math;
import java.io.*;
public class Cf {
	static class graph_bfs{
		int num_vert;
		//can also write List<Integer> adjList[];
		List<Integer>[] adjList;// adjList is an array of type- linked list
		// that means every element of the array can make its own linked list.
		int[] vis;
		int[] vis2;
		graph_bfs(int num_vert){
			this.num_vert=num_vert;
			adjList=new LinkedList[num_vert+1];// think like int[] a=new int[n];
			vis=new int[num_vert+1];
			vis2=new int[num_vert+1];
			for (int i = 0; i <= num_vert; i++) {
				adjList[i]=new LinkedList<>();
			}
		}
		void addEdge(int src,int dest,int[][] edge) {
			adjList[src].add(dest);
			adjList[dest].add(src);// only for undirected graph
			edge[src][dest]=1;
			edge[dest][src]=1;
		}
		int[] bfs_trav(int root,int n){
			Queue<Integer> que=new LinkedList<>();
			int[] dist_s=new int[n+1];
			vis[root]=1;
			que.add(root);
//			System.out.print(que.peek()+" ");
			while(!que.isEmpty()) {
				//System.out.print(que.peek()+" ");
				int v=que.remove();
//				System.out.print(que.peek()+" ");
				for(int j:adjList[v]) {
					if(vis[j]==0) {
						vis[j]=1;
						dist_s[j]=dist_s[v]+1;
						que.add(j);
						
					}
				}
			}
			return dist_s;
		}
		int[] bfs_trav2(int root,int n){
			Queue<Integer> que2=new LinkedList<>();
			int[] dist_t=new int[n+1];
			vis2[root]=1;
			que2.add(root);
//			System.out.print(que.peek()+" ");
			while(!que2.isEmpty()) {
				//System.out.print(que.peek()+" ");
				int v=que2.remove();
//				System.out.print(que.peek()+" ");
				for(int j:adjList[v]) {
					if(vis2[j]==0) {
						vis2[j]=1;
						dist_t[j]=dist_t[v]+1;
						que2.add(j);
						
					}
				}
			}
			return dist_t;
		}
	}
	public static void main(String[] args)  throws IOException{
		
		Reader.init(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n=Reader.nextInt();
		int m=Reader.nextInt();
		int s=Reader.nextInt();
		int t=Reader.nextInt();
//		int x=s;
//		s=Math.min(s, t);
//		t=Math.max(x, t);
		int[][] edge=new int[n+1][n+1];
		graph_bfs obj=new graph_bfs(n);
		for (int i = 0; i < m; i++) {
			obj.addEdge(Reader.nextInt(), Reader.nextInt(),edge);
		}
		int[] dist_s=obj.bfs_trav(s,n);
		int[] dist_t=obj.bfs_trav2(t,n);
		int ans=0;
		for (int i = 1; i <=n; i++) {
			for (int j = i+1; j <= n; j++) {
				if(dist_s[i]+dist_t[j]+1>=dist_s[t]
				   && dist_s[j]+dist_t[i]+1>=dist_s[t]	
				   && edge[i][j]!=1) {
					ans++;
				}
			}
		}
		out.println(ans);
		out.flush();
	}
} 
class Reader {

    static BufferedReader reader;

    static StringTokenizer tokenizer;



    /** call this method to initialize reader for InputStream */

    static void init(InputStream input) {

        reader = new BufferedReader(

                     new InputStreamReader(input) );

        tokenizer = new StringTokenizer("");

    }



    /** get next word */

    static String next() throws IOException {

        while ( ! tokenizer.hasMoreTokens() ) {

            //TODO add check for eof if necessary

            tokenizer = new StringTokenizer(

                   reader.readLine() );

        }

        return tokenizer.nextToken();

    }



    static int nextInt() throws IOException {

        return Integer.parseInt( next() );

    }

	

    static double nextDouble() throws IOException {

        return Double.parseDouble( next() );

    }

}
