Problem: Problem Statement
Little Chef doesn't love math anymore. He loves Aleksandra.


Sashen'ka is nice. They spend all the time together. Even their birthdays they are celebrating together, because they were born on the same day :)


And now, this day is coming...


Chef know that most of all Sasha loves numbers, that's why he bought N positive numbers to a girl.
From her side, Sasha as all girls, thought that if she likes something, then all people like that too. And bought to a boy N numbers too. xD
After all greeting young people decide to play a game with their gifts. The game will be continued for N turns, in each turn the following will be done:
Chef randomly choose some number x from his gift.
Sasha randomly choose some number y form her gift.
If x^y > y^x then girl will kiss fellow.
Numbers x,y will be discarded from gifts.
Now chef is wondering what is the expected number of times he will be kissed by Sasha ?

 

Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
The first line of each test case contains a single integer N denoting the number of numbers in each gift. The second line contains N space-separated integers A1, A2, ..., AN denoting the numbers Sasha gave to Chef. Next line describe B1, B2, ..., BN numbers boy gave to girl in the same way. 
 

Output
For each test case, output a single line containing answer for corresponding test. Your answer will be considered as correct if it will have absolute error not more then 10^-6.
 

Constraints
1 ≤ T ≤ 5
1 ≤ N ≤ 10^5
1 ≤ Ai ≤ 10^9
1 ≤ Bi ≤ 10^9
 

Example

Input
3
1
3
4
2
2 3
1 4
2
2 4
2 2

Output:
1.000000
1.500000
0.000000


 

Explanation
Example case 1. Game will have only 1 turn. Chef will choose 3, while Sasha will choose 4. Since 3^4>4^3 girl will kiss boy. Hence answer is 1.

Solution (in PYTHON):

Solution:
#!/usr/bin/python

def isKiss(sn, cn):
    if (sn == 1 and cn > 1):
        return True
    elif (cn == 3 and sn == 2):
        return True
    elif (cn == 2 and sn == 4):
        return False
    elif (sn > cn):
        return True

    return False
#end

for t in range(0, int(raw_input())):
    n = int(raw_input())
    chef = sorted([int(item) for item in raw_input().split()], reverse=True)
    sasha = sorted([int(item) for item in raw_input().split()], reverse=True)
    
#    print chef
#    print sasha
    
    kissed = 0
    index = 0
    count4 = 0
    count3 = 0
    count2 = 0
    count1 = 0
    for item in sasha:
        if item == 4:
            count4 += 1
        if item == 3:
            count3 += 1
        if item == 2:
            count2 += 1
        if item == 1:
            count1 += 1
    
    if count4 > 0:
        sasha.remove(4)
    if count3 > 0:
        sasha.remove(3)
    if count2 > 0:
        sasha.remove(2)
    if count1 > 0:
        sasha.remove(1)
    
#    print chef
#    print sasha
    
    for i in range(0, n):
        while (index < len(sasha) and sasha[index] > 4 and isKiss(sasha[index], chef[i])):
            index += 1
        #end

        if (chef[i] > 4):
            kissed += index + count1
        elif chef[i] == 4:
            kissed += index + count1
        elif chef[i] == 3:
            kissed += index + count4 + count2 + count1
        elif chef[i] == 2:
            kissed += index + count1
        
    #end
    
    print kissed / float(n)
#    print kissed
#    print n
    
#end