The annual bicycle rally in Byteburg starts soon. Byteburg's cyclists are natural long distance riders. The local motorcyclists, who have feuded with the cyclists for years, decided to sabotage the event.
Byteburg has n intersections joined by one way streets. The street network has no cycles: if you can ride from intersection u to intersection v, then you can never get from v back to u.
The rally route runs along Byteburg's streets. Early in the morning of the rally day the motorcyclists will ride to one intersection and block it completely. The cyclists' association will then pick a new route, but the new route may be short, so the riders cannot show their endurance. That is what the motorcyclists want. They block the intersection that makes the longest route avoiding it as short as possible.
A route is a sequence of distinct intersections followed along the direction of the streets, and its length is the number of streets it uses. A route that stays at one intersection and uses no street has length 0.
The first line contains two integers n and m separated by a single space (2≤n≤500000, 1≤m≤1000000), the number of intersections and the number of streets in Byteburg. The intersections are numbered from 1 to n.
Each of the next m lines describes one street. The i-th of them contains two integers ai and bi separated by a single space (1≤ai,bi≤n, ai=bi), meaning there is a one way street from intersection ai to intersection bi. The street network has no cycles.
Print two integers separated by a single space. The first is the number of the intersection the motorcyclists should block. The second is the largest number of streets the cyclists can ride along after that intersection is blocked.
If several intersections reach the same smallest maximum, print the one with the smallest number.