#include using namespace std; int main(){ long int a,b; cin>>a>>b; if(a*b>a+b) cout<<"P"<a*b) cout<<"S"<