import java.math.BigInteger; import java.util.Scanner; public class No_441 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); BigInteger a = scanner.nextBigInteger(); BigInteger b = scanner.nextBigInteger(); BigInteger c = a.add(b); BigInteger d = a.multiply(b); if(c.compareTo(d)>0){ System.out.println("S"); }else if(c.compareTo(d)<0){ System.out.println("P"); }else if(c.equals(d)){ System.out.println("E"); } } }