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 aa = 100; int bb = 100; if (a.length() == 1) { aa = Integer.parseInt(a); } if (b.length() == 1) { bb = Integer.parseInt(b); } if (aa * bb > aa + bb) { System.out.println("P"); } else if (aa * bb == aa + bb) { System.out.println("E"); } else { System.out.println("S"); } } }