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