a,b=map(int,input().split()) if (a-1)*(b-1)>1: print("P") elif (a-1)*(b-1)<1: print("S") elif a==b==0 or a==b==2: print("E")