There is a set consisting of distinct integers. The
smallest element in this set is
. We want to divide this set into two sets,
and
, such that:
- The absolute difference of any two distinct elements in
is
or greater.
- The absolute difference of any two distinct elements in
is
or greater.
How many ways are there to perform such a division, modulo ? Note that
or
may be empty.
Input Specification
The first line will contain three integers,
.
The next lines will each contain one integers,
.
Output Specification
Print the number of different divisions satisfying the conditions, modulo .
Subtasks
For 2/15 of the points, .
For an additional 5/15 of the points, .
Sample Input 1
5 3 7
1
3
6
9
12
Sample Output 1
5
Sample Input 2
7 5 3
0
2
4
7
8
11
15
Sample Output 2
4
Sample Input 3
8 2 9
3
4
5
13
15
22
26
32
Sample Output 3
13
Comments