import java.util.*; import java.math.*; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws Exception { BigInteger a = new BigInteger(sc.next()); BigInteger b = new BigInteger(sc.next()); int ret = a.add(b).compareTo(a.multiply(b)); if (ret > 0) { System.out.println("S"); } else if (ret < 0) { System.out.println("P"); } else { System.out.println("E"); } } }