2023 年上海市大学生程序设计竞赛 - 一月赛

D. Elden Remembrance

单点时限: 2.0 sec

内存限制: 512 MB

After thousands of battles, the astrologer Komorebi, the warrior Amuzi and the samurai lbromine finally defeat the Elden Beast and get the Elden Remembrance. As usual, they decide to fight a duel to determine the ownership of the trophy.

They all have a deadly skill, but the skill will not hit the target certainly. Formally, Komorebi‘s skill has the probability of P1 to hit the target, Amuzi‘s skill has the probability of P2 to hit the target, and lbromine‘s skill has the probability of P3 to hit the target. And once the skill hits the target, the target will be dead.

Because of the difference of the role they choose, P1>P2>P3 always holds.

For each turn, all living players can choose one target respectively, and use their skill at the same time.

Since they fight with each other for a long time, so they know each other very much, including the hit rate of their skills. And they are intelligent enough to make the greatest choice in each turn.

You will be given the hit rate of their skills and an integer n, please calculate their living probability after n turns of duel.

输入格式

The first line contains an integer n(1n105).

The second line contains 3 integers, A1,A2 and A3(100A1>A2>A30), A1=P1×100, A2=P2×100, A3=P3×100 holds.

输出格式

Output 3 lines including 1 integer indicating the living probability of the astrologer Komorebi, the warrior Amuzi and the samurai lbromine respectively.

You should output the answer modulo 109+7. It can be proven that the answer can be represented as the format PQ, you should output the integer X that satisfies X×QP(mod109+7).

样例

Input
2
80 60 40
Output
839040006
985600007
606400005