#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=1444999999999999; ll mod=998244353; int main(){ ld p,q; cin >> p >> q; ld left=1.0,right=mod; for (ll i = 0; i < 1000; i++) { ld mid=(right+left)/2.0; ld x=log(2.0); ld y=log(mid); y/=x; if (mid*mid