#! /usr/bin/env python3 A, B = map(int, input().split()) s = A + B p = A * B if s > p: print('S') elif p > s: print('P') else: print('E')