import java.util.*; import java.math.BigInteger; class test{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); BigInteger A = new BigInteger(sc.next()); BigInteger B = new BigInteger(sc.next()); if( (A.add(B)).compareTo (A.multiply(B)) == 1 ){ System.out.println("S"); } else if( (A.add(B)).compareTo (A.multiply(B)) == -1 ){ System.out.println("P"); } else{ System.out.println("E"); } } }