Hongjun and Myungwoo play a game with sequences. Hongjun first writes down a sequence A of N natural numbers, chosen however he likes, and Myungwoo writes down a sequence S of the same length in the same way.
The game runs for N rounds. In round i, Hongjun has to erase one number from his own sequence A that is not greater than Si. If no such number is left, Hongjun loses. If he finishes all N rounds, Hongjun wins.
Given Myungwoo's sequence S, count the sequences A that let Hongjun win when he plays with an optimal strategy. Two sequences with the same numbers in a different order count as different sequences.
The first line contains the length N. (1≤N≤200)
The i-th of the next N lines contains Si. (1≤Si≤109)
Print the number of sequences A that Hongjun can win with, modulo 1,000,000,007.
For N=2 and S=(1,2), the sequences A that Hongjun can win with are (1,1), (1,2), and (2,1).