import java.math.BigInteger; /** * Created by nullzine on 2017/01/18. */ public class Main { public static void main(String[] args){ String[] strs = new java.util.Scanner(System.in).nextLine().split(" "); System.out.println(new BigInteger(strs[0]).multiply(new BigInteger(strs[1])).compareTo(new BigInteger(strs[0]).add(new BigInteger(strs[1])))==0?"E":(new BigInteger(strs[0]).multiply(new BigInteger(strs[1])).compareTo(new BigInteger(strs[0]).add(new BigInteger(strs[1])))<0?"S":"P")); } }