Almost shortest path#10116

Almost shortest path

1 second
128 megabytes
Easy

Undirected unweighted graph is given. Two vertices and are given. Let the shortest path from to be . **Almost shortest path** from to is a path of minimum length that does not contain any edge along which a path of length can pass. Find the length of the almost shortest path or print **-1** if such path does not exist.

Input

First line contains four integers: number of vertices , number of edges (n, m \le 10^5) and numbers of vertices and (1 \le s, t \le n). Each of the next lines contain two integers and that describe an undirected edge .

Output

Print the length of the almost shortest path between the vertices and . If such path does not exist, print **-1**.

Examples

Example 1

Loading
Loading

Note

![prb10116.gif](https://static.e-olymp.com/content/2d/2d8e7432d2ac7107a352c1bfc49b37c6647b05c3.gif) The shortest path between vertices and equals to . The edges that the shortest path can go through are highlighted in red. **Almost shortest path** is the shortest path that does not go along any of the red edges. The almost shortest path is highlighted in blue, its length is .