#include using namespace std; int main() { double p,q,p1,p2; cin>>p>>q; p1 = (1 - p) * q; p2 = p * (1 - q) * q; if(p1