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
import java.util.*;


public class MainProgram { 
	public static void main(String[] args) {
		dijkstra(new Scanner(System.in));
	}
	
	public static void dijkstra(Scanner input) {
		int numVertices = input.nextInt();
		int numEdges = input.nextInt();
		int startNode = input.nextInt() - 1;
		int endNode = input.nextInt() - 1;
		ArrayList<Vertex> vertices= new ArrayList<>();
		for(int i = 1; i <= numVertices; i++){
			vertices.add(new Vertex(i));
		}
		for(int i = 0; i < numEdges; i++){
			Vertex temp1 = vertices.get(input.nextInt() - 1);
			Vertex temp2 = vertices.get(input.nextInt() - 1);
			temp1.adjacent.add(new Edge(temp2, 1));
			temp2.adjacent.add(new Edge(temp1, 1));
		}
		input.close();
		Vertex startVertex =vertices.get(startNode);
		PriorityQueue<Path> sortedQ = new PriorityQueue<>();
		sortedQ.add(new Path(startVertex, 0));
		startVertex.weightedCost = 0;
		while(!sortedQ.isEmpty()) {
			Path curPath = sortedQ.remove();
			Vertex curVertex = curPath.dest;
			if(curVertex.scratch ==  0) {	// checks for visited or not
				curVertex.scratch = 1;
				for(Edge e : curVertex.adjacent) {
					Vertex adj = e.dest;
					int newPathCost = e.cost + curPath.weightedCostOfPath;
					// Is my path value smaller than the current vertex value
					if(adj.scratch == 0 && newPathCost < adj.weightedCost) {
						// sets weight to be path weight + single edge weight
						adj.weightedCost = newPathCost;
						// sets prev node to be the end node in the path
						adj.prev = curVertex;
						// add the new path to the priority queue
						sortedQ.add(new Path(adj, newPathCost));
					}
				}
			}
		}
		resetScratches(vertices);
		Vertex endVertex = vertices.get(endNode);
		sortedQ.add(new Path(endVertex, 0));
		endVertex.weightedCostEnd = 0;
		while(!sortedQ.isEmpty()) {
			Path curPath = sortedQ.remove();
			Vertex curVertex = curPath.dest;
			if(curVertex.scratch ==  0) {	// checks for visited or not
				curVertex.scratch = 1;
				for(Edge e : curVertex.adjacent) {
					Vertex adj = e.dest;
					int newPathCost = e.cost + curPath.weightedCostOfPath;
					// Is my path value smaller than the current vertex value
					if(adj.scratch == 0 && newPathCost < adj.weightedCostEnd) {
						// sets weight to be path weight + single edge weight
						adj.weightedCostEnd = newPathCost;
						// sets prev node to be the end node in the path
						adj.prev = curVertex;
						// add the new path to the priority queue
						sortedQ.add(new Path(adj, newPathCost));
					}
				}
			}
		}
		int bestPath = endVertex.weightedCost;
		int counter = 0;
		for(Vertex a: vertices) 
			for(Vertex b: vertices) 
				if((a.id != b.id ) && (checkIfPathExists(b, a.adjacent))) {
					if((a.weightedCost + b.weightedCostEnd + 1) >= bestPath) 
						if((b.weightedCost + a.weightedCostEnd + 1) >= bestPath) 
							counter++;
				}
						
		System.out.println(counter/2);
		
	}
	private static void resetScratches(List <Vertex>vertices) {
		for(Vertex v: vertices) 
			v.scratch = 0;
	}
	private static void printPath(Vertex end) {
		ArrayList<Integer> vList = new ArrayList<>();
		vList.add(end.id);
		while(end.prev != null) {
			vList.add(end.prev.id);
			end = end.prev;
		}
		for(int x: vList) 
			System.out.print(x + " ");
		System.out.println();
	}
	// models edge between two vertices
	private static class Edge {
		private Vertex dest;
		private int cost;
		public Edge(Vertex d, int c) {
			dest = d;
			cost = c;
		}

	}

	// checks if a node is in a list of edges
	private static boolean checkIfPathExists(Vertex v, List<Edge> edges) {
		for(Edge e:edges) {
			Vertex listedVertex = e.dest;
			if(listedVertex.id == v.id) 
				return false;
		}
		return true;
	}
	
	// model a vertex. uses list of edges from this vertex to others
	private static class Vertex {
		private List<Edge> adjacent;
		private int scratch;
		private int id;
		private Vertex prev;
		private int weightedCost;
		private int weightedCostEnd;
		public Vertex(int id) {
			adjacent = new LinkedList<>();
			this.id = id;
			weightedCost = Integer.MAX_VALUE;
			weightedCostEnd = Integer.MAX_VALUE;
		}
	} // end of the Vertex class
	
	private static class Path implements Comparable<Path> {
		private int weightedCostOfPath;
		private Vertex dest;
		public Path(Vertex v, int c) {
			dest = v;
			weightedCostOfPath = c;
		}
		public int compareTo(Path other) {
			return weightedCostOfPath - other.weightedCostOfPath;
		}
	}
}
