a, b = gets.chomp.split(" ").map!{|u| u.to_i} if(a * b > a + b) ans = "P" elsif(a * b < a + b) ans = "S" else ans = "E" end puts ans