import java.util.*; import java.lang.*; import java.io.*; import java.math.*; class Main{ public static void main (String[] args) throws java.lang.Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] lines = br.readLine().toString().split(" "); BigInteger a = new BigInteger(lines[0]); BigInteger b = new BigInteger(lines[1]); BigInteger s = a.add(b); BigInteger p = a.multiply(b); switch(s.compareTo(p)){ case -1: System.out.println("P"); break; case 0: System.out.println("E"); break; case 1: System.out.println("S"); break; } } }