#include <bits/stdc++.h>

using namespace std;

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    string A, B;

    cin >> A >> B;

    if (A == "0" && B == "0")
    {
        cout << 'E' << '\n';
    }
    else if (A == "0" || B == "0")
    {
        cout << 'S' << '\n';
    }
    else
    {
        if (A == "1" || B == "1")
        {
            cout << 'S' << '\n';
        }
        else
        {
            if (A == "2" && B == "2")
            {
                cout << 'E' << '\n';
            }
            else
            {
                cout << 'P' << '\n';
            }
        }
    }
   

    return 0;
}