a,b = gets.split.map(&:to_i)
if a*b > a+b then
  puts "P"
elsif a*b < a+b then
  puts "S"
else
  puts "E"
end