A, B = gets.split.map(&:to_i) s = A + B; p = A * B if s > p then puts "S" elsif s < p then puts "P" else puts "E" end