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