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

public class TaskD
{
    public static void main(String[] args)
    {
        new TaskD(System.in, System.out);
    }

    static class Solver implements Runnable
    {
        static final int INFINITY = (int) 1e9 + 7;
        int v, e, s, t;
        List<Edge>[] adj;
        Set<Integer>[] sets;
        Node[] nodes;
        InputReader in;
        PrintWriter out;

        void solve()
        {
            v = in.nextInt();
            e = in.nextInt();
            s = in.nextInt() - 1;
            t = in.nextInt() - 1;
            adj = new List[v];
            sets = new Set[v];

            for (int i = 0; i < v; i++)
            {
                adj[i] = new ArrayList<>();
                sets[i] = new HashSet<>();
            }

            for (int i = 0; i < e; i++)
            {
                int u = in.nextInt() - 1;
                int to = in.nextInt() - 1;

                adj[u].add(new Edge(to, 1));
                adj[to].add(new Edge(u, 1));
                sets[u].add(to);
                sets[to].add(u);
            }

            int[] sShortest = findShortestPaths(s);
            int[] tShortest = findShortestPaths(t);
            int minST = sShortest[t];
            int cnt = 0;

            for (int i = 0; i < v; i++)
            {
                if (i == s || i == t)
                    continue;

                for (int j = i + 1; j < v; j++)
                {
                    if (j == s || j == t)
                        continue;

                    if (sets[i].contains(j))
                        continue;

                    if (sShortest[i] + tShortest[j] + 1 < minST || sShortest[j] + tShortest[i] + 1 < minST)
                        continue;

//                    System.out.println(i + " " + j);
                    cnt++;
                }
            }

            for (int i = 0; i < v; i++)
            {
                if (i == s || i == t || sets[i].contains(s))
                    continue;

                if (minST > 1 + tShortest[i])
                    continue;

//                System.out.println("s : " + s + ", i : " + i + ", sS[i] : " + sShortest[i] + ", tS[i] : " +
//                        tShortest[i]);
//                System.out.println(i + " " + s);
                cnt++;
            }

            for (int i = 0; i < v; i++)
            {
                if (i == t || i == s || sets[i].contains(t))
                    continue;

                if (minST > 1 + sShortest[i])
                    continue;

//                System.out.println("t : " + t + ", i : " + i + ", sS[i] : " + sShortest[i] + ", tS[i] : " +
//                        tShortest[i]);
//                System.out.println(i + " " + t);
                cnt++;
            }

            out.println(cnt);
        }

        int[] findShortestPaths(int start)
        {
            int[] distance = new int[v];

            for (int i = 0; i < v; i++)
                distance[i] = INFINITY;

            TreeSet<Node> set = new TreeSet<>();

            distance[start] = 0;
            set.add(new Node(start, 0, -1));

            while (set.size() > 0)
            {
                Node curr = set.pollFirst();

                for (Edge edge : adj[curr.node])
                {
                    if (distance[curr.node] + edge.weight < distance[edge.to])
                    {
                        set.remove(new Node(edge.to, distance[edge.to], -1));
                        distance[edge.to] = distance[curr.node] + edge.weight;
                        set.add(new Node(edge.to, distance[edge.to], curr.node));
                    }
                }
            }

            return distance;
        }

        static class Edge
        {
            int to, weight;

            public Edge(int to, int weight)
            {
                this.to = to;
                this.weight = weight;
            }

        }

        static class Node implements Comparable<Node>
        {
            int node, dist, parent;

            public Node(int node, int dist, int parent)
            {
                this.node = node;
                this.dist = dist;
                this.parent = parent;
            }

            @Override public int compareTo(Node o)
            {
                if (dist == o.dist)
                    return Integer.compare(node, o.node);

                return Integer.compare(dist, o.dist);
            }

        }

        public Solver(InputReader in, PrintWriter out)
        {
            this.in = in;
            this.out = out;
        }

        @Override
        public void run()
        {
            solve();
        }

    }

    static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public int read()
        {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                }
                catch (IOException e)
                {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt()
        {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-')
            {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c & 15;

                c = read();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public int[] nextIntArray(int arraySize)
        {
            int array[] = new int[arraySize];

            for (int i = 0; i < arraySize; i++)
                array[i] = nextInt();

            return array;
        }

        public long nextLong()
        {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sign = 1;

            if (c == '-')
            {
                sign = -1;

                c = read();
            }

            long result = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                result *= 10;
                result += c & 15;

                c = read();
            } while (!isSpaceChar(c));

            return result * sign;
        }

        public long[] nextLongArray(int arraySize)
        {
            long array[] = new long[arraySize];

            for (int i = 0; i < arraySize; i++)
                array[i] = nextLong();

            return array;
        }

        public float nextFloat()
        {
            float result, div;
            byte c;

            result = 0;
            div = 1;
            c = (byte) read();

            while (c <= ' ')
                c = (byte) read();

            boolean isNegative = (c == '-');

            if (isNegative)
                c = (byte) read();

            do
            {
                result = result * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');

            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    result += (c - '0') / (div *= 10);

            if (isNegative)
                return -result;

            return result;
        }

        public double nextDouble()
        {
            double ret = 0, div = 1;
            byte c = (byte) read();

            while (c <= ' ')
                c = (byte) read();

            boolean neg = (c == '-');

            if (neg)
                c = (byte) read();

            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');

            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    ret += (c - '0') / (div *= 10);

            if (neg)
                return -ret;

            return ret;
        }

        public String next()
        {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            StringBuilder res = new StringBuilder();

            do
            {
                res.appendCodePoint(c);

                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        public String nextLine()
        {
            int c = read();

            StringBuilder result = new StringBuilder();

            do
            {
                result.appendCodePoint(c);

                c = read();
            } while (!isNewLine(c));

            return result.toString();
        }

        public boolean isNewLine(int c)
        {
            return c == '\n';
        }

        public boolean isSpaceChar(int c)
        {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public void close()
        {
            try
            {
                stream.close();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
        }

        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }

    }

    public TaskD(InputStream inputStream, OutputStream outputStream)
    {
//		uncomment below line to change to BufferedReader
//		BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Thread thread = new Thread(null, new Solver(in, out), "TaskD", 1 << 29);

        try
        {
            thread.start();
            thread.join();
        }
        catch (InterruptedException e)
        {
            e.printStackTrace();
        }
        finally
        {
            in.close();
            out.flush();
            out.close();
        }
    }

}
