import java.util.Scanner; public class Hello { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String x = scanner.next(), y = scanner.next(); int a=0,b=0; if(x.length() < 4 || y.length() < 4) { a = Integer.parseInt(x); b = Integer.parseInt(y); System.out.println(a*b==a+b?"E":a*b>a+b?"P":"S"); } else { System.out.println("P"); } } }