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.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;


public class Main {
    private static int[][] direct = {{0, 1}, {1, 0}, {-1, 0}, {0, -1}};
    private static AWriter writer = new AWriter(System.out);
    private static AReader reader = new AReader(System.in);
    private static int n;
    private static final int INF=0x3f3f3f3f;
    private static final int MAXN=1000010;
    private static List<Vector<Edge>> E;
    private static int[] vis;
    private static int[] dis;
    private static int[] dis2;
    private static int[][] map;
    private static void dijkstra(int n,int start,int[] dis){
        vis=new int[n+1];
        for(int i=1;i<=n;i++)
            dis[i]=INF;
        PriorityQueue<Qnode> que=new PriorityQueue<>();
        dis[start]=0;
        que.add(new Qnode(start,0));
        Qnode tmp;
        while(!que.isEmpty()){
            tmp=que.poll();
            int u=tmp.v;
            if(vis[u]==1) continue;
            vis[u]=1;
            for(Edge edge:E.get(u)){
                int v=edge.v;
                int cost=edge.cost;
                if(vis[v]==0&&dis[v]>dis[u]+cost){
                    dis[v]=dis[u]+cost;
                    que.add(new Qnode(v,dis[v]));
                }
            }
        }
    }
    private static void addEdge(int u,int v,int c){
        E.get(u).add(new Edge(v,c));
    }
    public static void main(String[] args) throws IOException {
        n=reader.nextInt();
        int m=reader.nextInt();
        int f=reader.nextInt();
        int e=reader.nextInt();
        map=new int[n+1][n+1];
        E=new ArrayList<>();
        for(int i=0;i<=n;i++)
            E.add(new Vector<>());
        for(int i=1;i<=m;i++){
            int op1=reader.nextInt();
            int op2=reader.nextInt();
            map[op1][op2]=1;
            map[op2][op1]=1;
            addEdge(op1,op2,1);
            addEdge(op2,op1,1);
        }
        dis=new int[n+1];
        dis2=new int[n+1];
        dijkstra(n,f,dis);
        dijkstra(n,e,dis2);
        int min=dis[e];
        int ans=0;
        for(int i=1;i<n;i++){
            for(int j=i+1;j<=n;j++){
                if(map[i][j]==0&&Math.min(dis[i]+dis2[j],dis[j]+dis2[i])+1>=dis[e])
                    ans++;
            }
        }
        writer.println(ans);
        writer.close();
        reader.close();
    }
}
class Qnode implements Comparable<Qnode>{
    int v;
    int c;
    public Qnode(int v, int c) {
        this.v = v;
        this.c = c;
    }
    @Override
    public int compareTo(Qnode o){
        return c-o.c;
    }
}
class Edge{
    int v,cost;
    public Edge(int v, int cost) {
        this.v = v;
        this.cost = cost;
    }
}
class AReader implements Closeable {
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public AReader(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
        tokenizer = new StringTokenizer("");
    }
    private String innerNextLine() {
        try {
            return reader.readLine();
        } catch (IOException ex) {
            return null;
        }
    }
    public boolean hasNext() {
        while (!tokenizer.hasMoreTokens()) {
            String nextLine = innerNextLine();
            if (nextLine == null) {
                return false;
            }
            tokenizer = new StringTokenizer(nextLine);
        }
        return true;
    }
    public String nextLine() {
        tokenizer = new StringTokenizer("");
        return innerNextLine();
    }
    public String next() {
        hasNext();
        return tokenizer.nextToken();
    }
    public int nextInt() {
        return Integer.valueOf(next());
    }
    public long nextLong() {
        return Long.valueOf(next());
    }
    public double nextDouble() {
        return Double.valueOf(next());
    }
    public BigDecimal nextBigDecimal(){ return new BigDecimal(next()); }
    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }
    @Override
    public void close() throws IOException {
        reader.close();
    }
}

// Fast writer for ACM By Azure99
class AWriter implements Closeable {
    private BufferedWriter writer;

    public AWriter(OutputStream outputStream) {
        writer = new BufferedWriter(new OutputStreamWriter(outputStream));
    }

    public void print(Object object) throws IOException {
        writer.write(object.toString());
    }

    public void println(Object object) throws IOException {
        writer.write(object.toString());
        writer.write("\n");
    }

    @Override
    public void close() throws IOException {
        writer.close();
    }
}