lst = raw_input().split(" ") if lst[0]+lst[1]>lst[0]*lst[1]: print("S") elif lst[0]+lst[1]==lst[0]*lst[1]: print("E") else: print("P")