package main

import (
	"fmt"
	"io"
	"log"
	"math/big"
	"os"
)

func main() {
	_ = solver(os.Stdin, os.Stdout)
}

// max(A*B, A+B)
// A, B > 0
func solver(in io.Reader, out io.Writer) error {
	var A, B string
	fmt.Fscan(in, &A, &B)
	a := new(big.Int)
	a.SetString(A, 10)
	b := new(big.Int)
	b.SetString(B, 10)
	var ans string
	log.Println(A, B)
	log.Println(add(a, b), mul(a, b))
	switch add(a, b).Cmp(mul(a, b)) {
	case -1:
		ans = "P"
	case 1:
		ans = "S"
	case 0:
		ans = "E"
	}
	fmt.Fprintln(out, ans)
	return nil
}

func add(x, y *big.Int) *big.Int { return big.NewInt(0).Add(x, y) }

func sub(x, y *big.Int) *big.Int { return big.NewInt(0).Sub(x, y) }

func mul(x, y *big.Int) *big.Int { return big.NewInt(0).Mul(x, y) }

func div(x, y *big.Int) *big.Int { return big.NewInt(0).Div(x, y) }