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