Professor Zhang has a number sequence a_1,a_2,…,a_n. However, the sequence is not complete and some elements are missing. Fortunately, Professor Zhang remembers some attributes of the sequence:
Professor Zhang wants to know the maximum value of ∑_i=1na_ia_1+a_2 among all the possible sequences.
There are multiple test cases. The first line of input contains an integer T indicating the number of test cases. For each test case:
The first line contains two integers n and m (2≤n≤100, 0≤m≤n): the length of the sequence and the number of known elements.
Each of the next m lines contains two integers x_i and y_i (1≤x_i≤n, 0≤y_i≤100, x_i<x_i+1, y_i≥y_i+1) indicating that a_x_i=y_i.
There are at most 2000 test cases, and the total size of the input is no more than 350 kibibytes.
For each test case, output the answer as an irreducible fraction p/q where p and q are integers, and q>0.