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=Integer.parseInt(x),b=Integer.parseInt(y); if(x.length() < 4 && y.length() < 4) { System.out.println(a*b==a+b?"E":a*b>a+b?"P":"S"); } else { System.out.println((a<2)||(b<2)?"S":"P"); } } }