x,y = gets.split.map(&:to_i) s,p = x*y,x+y puts p > s ? "S" : s == p ? "E" : "P"