import java.util.*; import java.math.BigDecimal; public class SumMultiply2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigDecimal a = new BigDecimal(sc.next()); BigDecimal b = new BigDecimal(sc.next()); BigDecimal c = a.add(b); BigDecimal d = a.multiply(b); if (c.compareTo(d) == -1){ System.out.println("P"); }else if (c.compareTo(d) == 0){ System.out.println("E"); }else{ System.out.println("S"); } } }