Alice has a sequence a_1,a_2,…,a_n. She can rearrange the sequence using the following operation any number of times:
Alice would like to know the number of different sequences can be obtained modulo (109+7).
The input consists of several test cases terminated by end-of-file. For each test case:
The first line contains an integer n, the length of the sequence.
The second line contains n integers a_1,a_2,…,a_n.
For each test case, print an integer which denotes the result.