a, b = map(eval, raw_input().split()) s = a + b m = a * b if s > m: print "S" elif s < m: print "P" elif s == m: print "E"