Woodworking

Given plank recovery probabilities for a box needing N planks, compute the expected number of boxes built starting with M planks.

Hard8Dynamic programmingProbabilityMathNo attempts yetTime limit7sMemory limit512 MB

Problem

He has taken up woodworking and builds the same wooden box over and over to practice the basics. One box takes NN planks joined together. A finished box only takes up space, so he takes it apart right away and uses the planks for the next box.

Taking a box apart always yields fewer than NN intact planks, and the joints do not always come apart cleanly, so the count is random. For every ii with 0i<N0 \le i < N, the probability of recovering exactly ii planks is proportional to an integer qiq_i, and equals qi/(q0+q1++qN1)q_i / (q_0 + q_1 + \dots + q_{N-1}).

He currently holds MM planks and keeps building boxes until he can no longer build one. Write a program that computes the expected number of boxes he builds.

Input

The first line contains two integers NN and MM, separated by a space: the number of planks one box needs, and the number of planks he holds.

The ii-th of the next NN lines contains one nonnegative integer qi1q_{i-1}, the weight of recovering exactly i1i-1 planks from a disassembled box.

1N160001 \le N \le 16000, 0M10120 \le M \le 10^{12}, and q0+q1++qN1q_0 + q_1 + \dots + q_{N-1} is between 11 and 10910^9.

Output

Print the expected number of boxes he builds. To keep grading exact, write the answer as a reduced fraction a/ba/b and print (a×b1)mod1092616193(a \times b^{-1}) \bmod 1092616193 instead. The modulus 1092616193=221×521+11092616193 = 2^{21} \times 521 + 1 is prime, and b1b^{-1} is the multiplicative inverse of bb modulo that prime. The answer exists for every input allowed here.

Hint

The answer to the first sample, written as a reduced fraction, is 3/23/2.