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