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