import java.util.*; class No441{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long A = sc.nextInt(); long B = sc.nextInt(); if((A*B)<(A+B)){ System.out.println("S"); }else if((A*B)>(A+B)){ System.out.println("P"); }else{ System.out.println("E"); } } }