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.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Queue;
import java.util.LinkedList;
import java.util.Map;
import java.util.HashMap;

public class Traffic {

  public static class Node {
    int id;
    int dist = Integer.MAX_VALUE;
    int distFromEnd = Integer.MAX_VALUE;
    // boolean visited = false;
    // boolean visitedFromEnd = false;
    // Set<Integer> prev;

    Set<Node> neighbors;
    public Node (int num) {
      id = num;
      neighbors = new HashSet<>();
    }

    public void add(Node other) {
      neighbors.add(other);
    }

    @Override
    public int hashCode() {
      return id;
    }
  }
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt(); // # vertices
    int m = scan.nextInt(); // # edges
    int s = scan.nextInt(); // start index
    int t = scan.nextInt(); // end index

    List<Node> nodes = new ArrayList<>(n + 1);
    for(int i = 0; i <= n; i ++) {
      nodes.add(new Node(i));
    }

    for(int i = 0; i < m; i ++) {
      Node n1 = nodes.get(scan.nextInt());
      Node n2 = nodes.get(scan.nextInt());
      n1.add(n2);
      n2.add(n1);

    }
    scan.close();

    double_bfs(nodes, s, t);
    // current shortest path from start to end
    int shortest = nodes.get(t).dist;

    int count = 0;
    for(int i = 0; i < nodes.size() - 1; i ++) {
      Node node = nodes.get(i);
      for(int j = i + 1; j < nodes.size(); j ++) {
        Node other = nodes.get(j);
        // distance to start + distance to end + 1 (new road)
        int newPath = Math.min(other.dist + node.distFromEnd, node.dist + other.distFromEnd) + 1;
        if (newPath >= shortest && !other.neighbors.contains(node)) {
          // increment count if shortest is not affected and no road exists
          count ++;
        }
        
      }
    }
    System.out.println(count);

  }
  // two-way bfs - saves a distance each to start and end
  public static void double_bfs(List<Node> nodes, int s, int t) {
    
    Queue<Node> pq = new LinkedList<>();
    pq.add(nodes.get(s));
    nodes.get(s).dist = 0;

    // find shortest path lengths from start
    while(!pq.isEmpty()) {
      Node curr = pq.poll();
      // curr.visited = true;
      
      for(Node other: curr.neighbors) {
        int newDist = curr.dist + 1;
        if(newDist <= other.dist) {
          other.dist = newDist;
          // other.prev = new HashSet<>();
          // other.prev.add(curr.id);
          pq.add(other);
        } 
        // else if (newDist == other.dist) {
        //   // other.prev.add(curr.id);
        //   pq.add(other);
        // }
        
      }
      
    }

    // find shortest path lengths from end
    pq.add(nodes.get(t));
    nodes.get(t).distFromEnd = 0;
    while(!pq.isEmpty()) {
      Node curr = pq.poll();
      // curr.visitedFromEnd = true;
      
      for(Node other: curr.neighbors) {
        int newDist = curr.distFromEnd + 1;
        if(newDist <= other.distFromEnd) {
          other.distFromEnd = newDist;
          pq.add(other);
        } 
        // else if (newDist == other.distFromEnd) {
        //   pq.add(other);
        // }
        
      }
      
    }
  }
}
