a,b = map(int, raw_input().split()) w = a + b s = a * b if w == s: print 'E' elif w > s: print 'S' else: print 'P'