import java.util.Scanner; import java.math.*; import static java.lang.System.out; public class No441{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); BigInteger a=sc.nextBigInteger(); BigInteger b=sc.nextBigInteger(); BigInteger s=a.add(b),p=a.multiply(b); if(s.compareTo(p)==0){out.println("E");} if(s.compareTo(p)>0){out.println("S");} if(s.compareTo(p)<0){out.println("P");} sc.close(); } }