a,b=map(int,input().split()) print("S" if a+b>a*b else "P" if a+b