K. Office Odyssey
time limit per test
5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Thomas has decided today is the day that Crapper & Co. bands together and embarks on an odyssey! That is, an odyssey aboard rolling chairs across the office...

However, due to a variety of logistical reasons, the odyssey is not one big path taken by all the employees at once. Rather, it is split up into $$$p$$$ journeys across the office, which the employees can choose to take in any order.

The office consists of $$$n$$$ buildings, connected together by $$$n-1$$$ hallways. Journey $$$i$$$ specifies its start building $$$s_i$$$ and its end building $$$e_i$$$, and employees are expected to take the shortest path from $$$s_i$$$ to $$$e_i$$$ via chair.

Given that rolling chairs not exactly the easiest to maneuver in, HR is concerned about how safe this activity will be. After all, any two journeys that use the same hallway or office building could result in a collision! Can you figure out how many pairs of journeys could lead to a collision?

Input

The first line contains 2 integers, $$$n$$$ and $$$m$$$ ($$$1 \leq n, m \leq 2 \cdot 10^5$$$), representing the number of buildings and journeys, respectively.

Then, $$$n-1$$$ lines follow, each containing two integers, $$$a$$$ and $$$b$$$ ($$$1 \leq a,b \leq n$$$), denoting a hallway connecting offices $$$a$$$ and $$$b$$$.

Finally, $$$m$$$ lines follow, the $$$i$$$th of which contains $$$s_i$$$ and $$$e_i$$$ ($$$1 \leq s_i, e_i \leq n$$$), denoting the start and end points of a journey.

Output

Output a single integer, the number of intersecting journeys.

Example
Input
8 4
1 2
1 3
1 4
2 5
3 6
3 7
4 8
5 8
6 7
5 6
7 8
Output
5