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