Watson gave a string to Sherlock. It is characters long and consists of only 1s and 0s. Now he asks: Given an integer , I'll pick two indices and at random between and , both inclusive. What's the probability that both and are 1 and ?
First line contains , the number of testcases. Each testcase consists of (the length of ) and in one line and string in second line.
Print the required probability as an irreducible fraction. If required answer is 0, output 0/1.
test1: Out of 16 choices, 9 pairs of satisfy our condition.