a,b = gets.split.map(&:to_i)

_s = a+b
_p = a*b
puts _s == _p ? "E" : _s < _p ? "P" : "S"