# coding: utf-8 a = list(map(int, input().split())) s = a[0] + a[1] p = a[0] * a[1] if s == p: print("E") elif s > p: print("S") else: print("P")