import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); int aInt; if (a.length() == 1) { aInt = Integer.parseInt(a); } else { aInt = 3; } int bInt; if (b.length() == 1) { bInt = Integer.parseInt(b); } else { bInt = 3; } if (aInt * bInt == aInt + bInt) { System.out.println("E"); } else if (aInt * bInt > aInt + bInt) { System.out.println("P"); } else { System.out.println("S"); } } }