C. Count Triples
time limit per test
1.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given three arrays $$$a,b,c$$$ of length $$$n$$$ and a number $$$m$$$.

Your task is to count the number of triples $$$(i,j,k)$$$ such that $$$a_i\times b_j \times c_k=m$$$.

Input

The first line of input contains two numbers $$$n(1\le n\le 5\times 10^5),m(1\le m\le 10^9)$$$.

The second line contains $$$n$$$ numbers $$$a_1,a_2,\ldots,a_n(1\le a_i\le m)$$$.

The third line contains $$$n$$$ numbers $$$b_1,b_2,\ldots,b_n(1\le b_i\le m)$$$.

The fourth line contains $$$n$$$ numbers $$$c_1,c_2,\ldots,c_n(1\le c_i\le m)$$$.

Output

Print the answer.

Examples
Input
3 3
1 2 3
1 1 3
2 3 3
Output
4
Input
4 2
1 1 1 1
1 1 1 1
1 1 1 1
Output
0
Input
6 18
2 4 3 5 7 1
18 6 2 3 5 9
1 1 3 2 7 5
Output
11
Note

In the first example, there are four triples satisfy the condition: $$$(1,1,2),(1,2,2),(1,1,3),(1,2,3)$$$.

In the second example, it can be shown that there's no triple satisfy the condition.