#include char xs[256]; char ys[256]; int main() { scanf("%s %s", xs, ys); bool xIsZero = strcmp(xs, "0") == 0 and strlen(xs) == 1; bool xIsOne = strcmp(xs, "1") == 0 and strlen(xs) == 1; bool xIsTwo = strcmp(xs, "2") == 0 and strlen(xs) == 1; bool yIsZero = strcmp(ys, "0") == 0 and strlen(ys) == 1; bool yIsOne = strcmp(ys, "1") == 0 and strlen(ys) == 1; bool yIsTwo = strcmp(ys, "2") == 0 and strlen(ys) == 1; if( xIsZero and yIsZero ) { puts("E"); return 0; } if( xIsZero or yIsZero ) { puts("S"); return 0; } if( xIsOne or yIsOne ) { puts("S"); return 0; } if( xIsTwo and yIsTwo ) { puts("E"); return 0; } puts("P"); return 0; return 0; }