a,b=gets.split.map(&:to_i) case (a+b <=> a*b) <=> 0 when 0 puts :E when 1 puts :S else puts :P end