//#include #include // cout, endl, cin #include // string, to_string, stoi #include // vector #include // min, max, swap, sort, reverse, lower_bound, upper_bound #include // pair, make_pair #include // tuple, make_tuple #include // int64_t, int*_t #include // printf #include // map #include // queue, priority_queue #include // set #include // stack #include // deque #include // unordered_map #include // unordered_set #include // bitset #include // isupper, islower, isdigit, toupper, tolower #include #include using namespace std; //using namespace atcoder; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++) typedef long long ll; typedef unsigned long long ull; const ll inf=1e18; using graph = vector > ; using P= pair; using vi=vector; using vvi=vector; using vll=vector; using vvll=vector; using vp=vector

; using vpp=vector; //string T="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //string S="abcdefghijklmnopqrstuvwxyz"; //g++ main.cpp -std=c++14 -I . //cout < bool chmin(T& a, T b) { if (a > b) { a = b; return true; } else return false; } template bool chmax(T& a, T b) { if (a < b) { a = b; return true; } else return false; } const int N=55555; int isprime[N+1]; vi prime; void getPrime(){ rep(i,N+1)isprime[i]=1; isprime[0]=0;isprime[1]=0; for(int i=2; i<=N; i++){ if(isprime[i])prime.push_back(i); for(int j=2*i; j<=N; j+=i){ isprime[j]=0; } } } int main(){cin.tie(0); ios::sync_with_stdio(false); int a,b; cin >> a >> b; if(a==b && a%2)cout << "Q" << endl; else if(abs(a-b)==1 && min(a,b)%2)cout << "Q" << endl; else cout << "P" << endl; }