A,B = map(int, input().split()) print('E' if A+B == A*B else 'P' if A*B > A+B else 'S')