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