#include #define rep(i,begin, end) for (ll i = begin; i < (ll)(end); i++) using namespace std; using ll = long long; template using pqueueAsc = priority_queue, greater>; template using pqueueDesc = priority_queue, less>; template using vec2 = vector>; template using vec3 = vec2>; template using vec4 = vec3>; template using vec5 = vec4>; template using vec6 = vec5>; int main(){ ll A,B;cin>>A>>B; bool flag = (max(A,B)-min(A,B) >= 2 && min(A,B) %2==1); flag = flag || (min(A,B)==2)|| (min(A,B)==1 && max(A,B)>2); cout<< (flag ? "P" : "Q")<