#include<stdio.h>
main(){
    double A,B;
    scanf("%lf%lf",&A,&B);
    printf("%c\n",A==B&&(A==0||A==2)?'E':A*B>A+B?'P':'S');
}