A, B = gets.split.map(&:to_i) ans = if A + B > A * B 'S' elsif A + B == A * B 'E' else 'P' end puts ans