#include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string a, b; cin >> a >> b; char ans; if(a == "0" && b == "0"){ ans = 'E'; cout << ans << endl; return 0; } if(a == "2" && b == "2"){ ans = 'E'; cout << ans << endl; return 0; } if((a[0] == '-' && b[0] == '-')){ ans = 'P'; cout << ans << endl; return 0; } if(a == "0"){ if(b[0] == '-'){ ans = 'P'; }else{ ans = 'S'; } cout << ans << endl; return 0; } if(b == "0"){ if(a[0] == '-'){ ans = 'P'; }else{ ans = 'S'; } cout << ans << endl; return 0; } if(a == "1" || b == "1"){ ans = 'S'; cout << ans << endl; return 0; } if((a[0] == '-' || b[0] == '-')){ ans = 'S'; cout << ans << endl; return 0; } ans = 'P'; cout << ans << endl; return 0; }