BIGZHUGOD and His Friends I
Problem Description
BIGZHUGOD and his three friends feel bored at home, then they decide to play a game called "niuniu".
The rules of "niuniu" are: first randomly pick 5 cards from all cards, then divide them into 2 groups, one group has 2 cards, and the other has 3 cards. If the sum of both groups are multiples of 10, then they are "niuniu". Moreover, A counts for 1, J, Q, K, black joker and red joker counts for 10.
BIGZHUGOD has an incomplete pack of card. And his three friends let BIGZHUGOD pick up 5 cards randomly, if they are "niuniu", BIGZHUGOD will gain meals from friends.
Now BIGZHUGOD knows the number of every kind of card, he wants to know the possibility that he can gain the meal.
Input
The first line of input contains an integer T, indicating the number of test cases (T ≤ 500).
Each case there are 15 integers x1, x2, ..., x15 indicating the number of A, 2, 3, ..., 10, J, Q, K, black joker, red joker. 0 ≤ x1, x2, ..., x13 ≤ 4, 0 ≤ x14, x15 ≤ 1, x1 + x2 ... + x15 ≥ 5.
Output
For each case output in a single line, contains the possibility of BIGZHUGOD can get big meal from his friends.
If the possibility is 0, output 0.
Otherwise, output p/q, where p and q are co-prime integers (have no common divisor greater than one).
Sample Input
2 4 4 4 4 4 4 4 4 4 4 4 4 4 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
Sample Output
2681/35139 0