An agency decided to measure how popular the websites in a network are. Every site can hold links to other sites. A link from a site to itself is ignored - a site is not allowed to make itself popular.
The popularity of a site is the number of links leading to it minus the number of links leading out of it.
Your task is to find the most popular site. If several sites share the highest popularity, report the one with the smallest number.
Input
First line of input will be a single integer - the number of testcases.
First line of each testcase contains two integers and - the number of sites and the number of links. The sites are numbered to .
In the next lines will be two integers and - a link leading from site to site . The same pair may appear more than once, and every occurrence counts as its own link.
Output
For every testcase print a single line with two integers - the number of the most popular site and its popularity.
Example
1 4 9 1 2 1 4 2 1 2 2 2 4 3 2 3 4 4 1 4 4
4 2
Three links lead to site (from , and ) and one leads out of it (to ), so its popularity is . The self-links and count for nothing. Sites and end at and site at , so nobody beats site .
Constraints
the sum of over all testcases does not exceed
the sum of over all testcases does not exceed
This problem was adapted, with permission, from Najpopularniji sajt, authored by Društvo matematičara Srbije and Fondacija Petlja.