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 org.omg.CORBA.INTERNAL;
import sun.reflect.generics.tree.Tree;

import java.io.*;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.*;

public class Newbie {

    static InputReader sc = new InputReader(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        solver s = new solver();
        long t = 1;
        while (t > 0) {
            s.solve();
            t--;
        }
        out.close();
    }

   /* static class descend implements Comparator<pair1> {
        public int compare(pair1 o1, pair1 o2) {
            if (o1.pop != o2.pop)
                return (int) (o1.pop - o2.pop);
            else
                return o1.in - o2.in;
        }
    }*/

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer token;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
            token = null;
        }

        public String next() {
            while (token == null || !token.hasMoreTokens()) {
                try {
                    token = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return token.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    static class card {
        long a;
        int cnt;
        int i;

        public card(long a, int cnt, int i) {
            this.a = a;
            this.cnt = cnt;
            this.i = i;
        }
    }

    static class ascend implements Comparator<pair> {
        public int compare(pair o1, pair o2) {
            if (o1.a != o2.a)
                return (int) (o1.a - o2.a);
            else
                return o1.b - o2.b;
        }
    }

    static class extra {

        static boolean v[] = new boolean[100001];
        static List<Integer> l = new ArrayList<>();
        static int t;

        static void shuffle(int a[]) {
            for (int i = 0; i < a.length; i++) {
                int t = (int) Math.random() * a.length;
                int x = a[t];
                a[t] = a[i];
                a[i] = x;
            }
        }

        static long gcd(long a, long b) {
            if (b == 0)
                return a;
            else
                return gcd(b, a % b);
        }

        static boolean valid(int i, int j, int r, int c, char ch[][]) {
            if (i >= 0 && i < r && j >= 0 && j < c && ch[i][j] != '#') {
                // System.out.println(i+" /// "+j);
                return true;
            } else {
                //  System.out.println(i+" //f "+j);
                return false;
            }
        }

        static void seive() {
            for (int i = 2; i < 100001; i++) {
                if (!v[i]) {
                    t++;
                    l.add(i);
                    for (int j = 2 * i; j < 100001; j += i)
                        v[j] = true;
                }
            }
        }

        static int binary(LinkedList<Integer> a, long val, int n) {
            int mid = 0, l = 0, r = n - 1, ans = 0;
            while (l <= r) {
                mid = (l + r) >> 1;
                if (a.get(mid) == val) {
                    r = mid - 1;
                    ans = mid;
                } else if (a.get(mid) > val)
                    r = mid - 1;
                else {
                    l = mid + 1;
                    ans = l;
                }
            }
            return (ans + 1);
        }

        static long fastexpo(long x, long y) {
            long res = 1;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res *= x;
                }
                y = y >> 1;
                x = x * x;
            }
            return res;
        }

        static long lfastexpo(long x, long y, long p) {
            long res = 1;
            x = x % p;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res = (res * x) % p;
                }
                y = y >> 1;
                x = (x * x) % p;
            }
            return res;
        }

       /* void dijsktra(int s, List<pair> l[], int n) {
            PriorityQueue<pair> pq = new PriorityQueue<>(new ascend());
            int dist[] = new int[100005];
            boolean v[] = new boolean[100005];
            for (int i = 1; i <= n; i++)
                dist[i] = 1000000000;
            dist[s] = 0;
            for (int i = 1; i < n; i++) {
                if (i == s)
                    pq.add(new pair(s, 0));
                else
                    pq.add(new pair(i, 1000000000));
            }
            while (!pq.isEmpty()) {
                pair node = pq.remove();
                v[node.a] = true;
                for (int i = 0; i < l[node.a].size(); i++) {
                    int v1 = l[node.a].get(i).a;
                    int w = l[node.a].get(i).b;
                    if (v[v1])
                        continue;
                    if ((dist[node.a] + w) < dist[v1]) {
                        dist[v1] = dist[node.a] + w;
                        pq.add(new pair(v1, dist[v1]));
                    }
                }
            }
        }*/
    }

    static class pair {
        long a;
        int b;

        public pair(long a, int i) {
            this.a = a;
            this.b = i;
        }
    }

    static class pair1 {
        pair p;
        int in;

        public pair1(pair a, int n) {
            this.p = a;
            this.in = n;
        }
    }


    static int inf = 5000013;

    static class solver {
        DecimalFormat df = new DecimalFormat("0.000000000");
        extra e = new extra();
        int mod = 1000000007;

        void solve() {
            int n = sc.nextInt();
            int m = sc.nextInt();
            int s = sc.nextInt() - 1;
            int t = sc.nextInt() - 1;
            int a[][] = new int[n][n];
            List<Integer> l[] = new ArrayList[n];
            for (int i = 0; i < n; i++)
                l[i] = new ArrayList<>();
            for (int i = 0; i < m; i++) {
                int u = sc.nextInt() - 1;
                int v = sc.nextInt() - 1;
                l[u].add(v);
                l[v].add(u);
                a[u][v] = 1;
                a[v][u] = 1;
            }
            bfs(s, n, l, 1);
            bfs(t, n, l, 2);
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j < n; j++) {
                    if (a[i][j] != 1 && !((ds[i] + dt[j] + 1) < ds[t] || (ds[j] + dt[i] + 1) < ds[t]))
                        cnt++;
                }
            }
            System.out.println(cnt);
        }

        int ds[] = new int[1001];
        int dt[] = new int[1001];

        void bfs(int s, int n, List<Integer> l[], int c) {
            boolean v[] = new boolean[n];
            Queue<Integer> q = new LinkedList<>();
            q.add(s);
            v[s] = true;
            while (!q.isEmpty()) {
                int t = q.poll();
                for (int h : l[t]) {
                    if (!v[h]) {
                        if (c == 1)
                            ds[h] = ds[t] + 1;
                        else
                            dt[h] = dt[t] + 1;
                        q.add(h);
                        v[h] = true;
                    }
                }
            }
        }
    }
}


