A, B = map(int, raw_input().split())
if A * B > A + B:
    print "P"
elif A * B < A + B:
    print "S"
else:
    print "E"