#Lutece1168. 凤神与狗

凤神与狗

Migrated from Lutece 1168 凤神与狗

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

凤神隐居山林,与猫狗为伴。起初,他拥有cc只猫和dd只狗。每天下午他随机从中选择一只出去游玩并且晚上归来。如果他带的是狗,则第二天早上狗的数量增加ww只,否则,猫的数量增加ww只。由于凤神特别钟爱狗,某些重要的日子他想带狗出去玩,于是他想知道他在第aa天和第bb天都带狗出去玩的概率是多少?

Input

第一行包含55个整数:$c(0<c\leq 1000000),d(0<d\leq 1000000),w(0<w\leq 1000000),a(0<a<1000000),b(a<b\leq 1000000)$

Output

答案用最简分数表示,x/yx/yxx为分子,yy为分母。

Samples

1 1 1 1 2
1/3

Resources

2015 UESTC ACM Training for Math