Time limit
2s
Memory limit
128 MB
Hongjun is watching a soccer match. To make the analysis simpler, divide the 90-minute match into 18 intervals of 5 minutes each. In each interval, team A and team B can each score at most one goal. The probability that team A scores in an interval and the probability that team B scores in an interval are given. Treat the scoring events in the intervals as independent.
Find the probability that, after the match ends, at least one team has scored a prime number of goals.
The first line contains the probability that team A scores in each 5-minute interval, given as an integer percentage.
The second line contains the probability that team B scores in each 5-minute interval, given as an integer percentage.
Both probabilities are integers between 0 and 100, inclusive.
Print the probability that at least one team finishes with a prime number of goals.
An absolute or relative error of at most 10^-6 is accepted.