1416 - [NOI2006]神奇的口袋

Input

Output

0/1,概率为1 应输出1/1。

Examples

Input

input 1
2 3 1
1 1
1 1
2 2
3 1

input 2
3 1 2
1 1 1
5 1

Output

output 1
1/12

output 2
1/3

Hint

1≤t,n≤1000, 1≤ak ,d≤10, 1≤x1

Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题