Do I Wanna Know?

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

You are in charge of organizing the new edition of Arctic Competition for Monkeys (ACM). There are nn monkeys taking part in this competition. The monkeys are numbered from 1 to nn. Every two monkeys participate in a separate contest with one problem against each other. There are no ties. Whenever i<ji < j, monkey ii defeats monkey jj with fixed probability pp.

You've been asked by your manager to calculate the entertainment coefficient of the competition. You have no idea what this coefficient means, neither does your manager, so you've decided to come up with a fairly weird definition.

Let f(k)f(k) be the probability that there exists a set of exactly kk monkeys such that every monkey in this set defeats every monkey not in this set.

Let g(k)g(k) be a pseudo-random sequence defined recursively as follows:

g(1)=1g(1) = 1;

g(i+1)=(g(i))2+2g(i + 1) = (g(i))^2 + 2 (for i2i \ge 2).

Then you've defined the entertainment coefficient to be equal to the following value:

_k=1n1f(k)g(k)\sum \limits\_{k=1}^{n-1} f(k) \cdot g(k).

Thus, you want to know the value of this sum for the known values of nn and pp. Or do you?

입력

The first line of the input contains a single integer n (2n61052 \le n \le 6 \cdot 10^5) --- the number of participants.

The second line contains two integers aa and bb (1a<b1001 \le a < b \le 100) --- the numerator and the denominator of fraction ab=p\frac{a}{b} = p.

출력

It can be shown that the answer can be represented as PQ\frac{P}{Q}, where PP and QQ are coprime integers and Q≢0(mod998244353)Q \not\equiv 0 \pmod{998244353}.

Output the value of PQ1P \cdot Q^{-1} modulo 998244353998244353.

힌트

In the example test case, f(1)=59f(1) = \frac{5}{9}, f(2)=3581f(2) = \frac{35}{81} and f(3)=59f(3) = \frac{5}{9}. Also, g(1)=1g(1) = 1, g(2)=3g(2) = 3 and g(3)=11g(3) = 11. Thus, the answer is 591+35813+5911=21527\frac{5}{9} \cdot 1 + \frac{35}{81} \cdot 3 + \frac{5}{9} \cdot 11 = \frac{215}{27}.