a = input().split() if int(a[0]) * int(a[1]) < int(a[0]) + int(a[1]) : print( "S" ) elif int(a[0]) * int(a[1]) > int(a[0]) + int(a[1]): print( "P" ) else: print( "E" )