import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); BigInteger A = new BigInteger(inputs[0]); BigInteger B = new BigInteger(inputs[1]); int r = (A.add(B)).compareTo(A.multiply(B)); if(r == -1) { System.out.println("P"); } else if (r == 0) { System.out.println("E"); } else { System.out.println("S"); } } }