#include using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { string A, B; cin >> A >> B; if( ( A == "0" && B == "0" ) || ( A == "2" && B == "2" ) ) { cout << "E" << endl; return 0; } else if( A == "0" || B == "0" || A == "1" || B == "1" ) { cout << "S" << endl; return 0; } cout << "P" << endl; return 0; }