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.DataInputStream;
import java.io.IOException;
import java.util.ArrayList;

public class Task954D {

    public static class FastScanner {

        protected DataInputStream dataInputStream;
        protected byte[] buffer = new byte[0x10000];
        protected int bufferOffset;
        protected int bufferLength;
        protected boolean isEndOfFile;

        public FastScanner() throws IOException {
            dataInputStream = new DataInputStream(System.in);
            Read();
        }

        protected void Read() throws IOException {
            final int length = dataInputStream.read(buffer);
            if (length > 0) {
                bufferLength = length;
            } else {
                bufferLength = 0;
                isEndOfFile = true;
            }
            bufferOffset = 0;
        }

        protected byte nextByte() throws IOException {
            if (bufferOffset == bufferLength) {
                if (!isEndOfFile) Read();
                if (isEndOfFile) return 0;
            }
            return buffer[bufferOffset++];
        }

        public int nextInt() throws IOException {
            int a = 0;
            boolean isNegative = false;

            byte b = nextByte();
            while (b <= ' ') b = nextByte();
            if (b == '-') {
                isNegative = true;
                b = nextByte();
            }
            while (b > ' ') {
                a = a * 10 + (b - '0');
                b = nextByte();
            }
            return isNegative ? -a : a;
        }

    }

    public static class Graf {

        public ArrayList<Integer>[] crosses;
        public int[] traceOrder1;
        public int[] traceOrder2;

        public Graf(final int n) {
            crosses = new ArrayList[n];
            traceOrder1 = new int[n];
            traceOrder2 = new int[n];
            for (int i = 0; i < n; i++) {
                crosses[i] = new ArrayList<Integer>();
            }
        }

        public void AddRoad(final int fromNode, final int toNode) {
            crosses[fromNode].add(toNode);
        }

        public void Trace1(final int node, final int order) {
            if (traceOrder1[node] == 0 || traceOrder1[node] > order) {
                traceOrder1[node] = order;
                for (final int toNode : crosses[node]) {
                    Trace1(toNode, order + 1);
                }
            }
        }

        public void Trace2(final int node, final int order) {
            if (traceOrder2[node] == 0 || traceOrder2[node] > order) {
                traceOrder2[node] = order;
                for (final int toNode : crosses[node]) {
                    Trace2(toNode, order + 1);
                }
            }
        }

    }

    public static void main(final String[] args) throws IOException {
        final FastScanner scanner = new FastScanner();
        final int n = scanner.nextInt();
        final int m = scanner.nextInt();
        final int s = scanner.nextInt() - 1;
        final int t = scanner.nextInt() - 1;

        final Graf graf = new Graf(n);

        for (int i = 0; i < m; i++) {
            final int u = scanner.nextInt() - 1;
            final int v = scanner.nextInt() - 1;
            graf.AddRoad(u, v);
            graf.AddRoad(v, u);
        }

        graf.Trace1(s, 1);
        graf.Trace2(t, 1);

        final int distance1 = graf.traceOrder1[t] - graf.traceOrder1[s];
        final int distance2 = graf.traceOrder2[s] - graf.traceOrder2[t];
        assert (distance1 == distance2);

        int sum = 0;
        for (int i = 0; i < n - 1; i++) {
            final int oi1 = graf.traceOrder1[i];
            final int oi2 = graf.traceOrder2[i];
            for (int j = i + 1; j < n; j++) {
                final int oj1 = graf.traceOrder1[j];
                final int oj2 = graf.traceOrder2[j];
                if (oi1 + oj2 - 1 >= distance1 && oi2 + oj1 - 1 >= distance1) {
                    sum++;
                }
            }
        }
        sum -= m;

        System.out.println(sum);

    }



}
