x = int(input())
y = int(input())
z = int(input())
# Block-1 Start
if x > 0 or y > 0 or z > 0:
if (x > 0 and y > 0) or (y > 0 and z > 0) or (z > 0 and x > 0):
if x > 0 and y > 0 and z > 0:
print('P3')
else:
print('P2')
else:
print('P1')
# Block-1 End
# Block-2 Start
if x < 0 or y < 0 or z < 0:
if (x < 0 and y < 0) or (y < 0 and z < 0) or (z < 0 and x < 0):
if x < 0 and y < 0 and z < 0:
print('N3')
else:
print('N2')
else:
print('N1')
# Block-2 End
eCA9IGludChpbnB1dCgpKQp5ID0gaW50KGlucHV0KCkpCnogPSBpbnQoaW5wdXQoKSkKCiMgQmxvY2stMSBTdGFydAppZiB4ID4gMCBvciB5ID4gMCBvciB6ID4gMDoKICAgIGlmICh4ID4gMCBhbmQgeSA+IDApIG9yICh5ID4gMCBhbmQgeiA+IDApIG9yICh6ID4gMCBhbmQgeCA+IDApOgogICAgICAgIGlmIHggPiAwIGFuZCB5ID4gMCBhbmQgeiA+IDA6CiAgICAgICAgICAgIHByaW50KCdQMycpCiAgICAgICAgZWxzZToKICAgICAgICAgICAgcHJpbnQoJ1AyJykKICAgIGVsc2U6CiAgICAgICAgcHJpbnQoJ1AxJykKIyBCbG9jay0xIEVuZAoKIyBCbG9jay0yIFN0YXJ0CmlmIHggPCAwIG9yIHkgPCAwIG9yIHogPCAwOgogICAgaWYgKHggPCAwIGFuZCB5IDwgMCkgb3IgKHkgPCAwIGFuZCB6IDwgMCkgb3IgKHogPCAwIGFuZCB4IDwgMCk6CiAgICAgICAgaWYgeCA8IDAgYW5kIHkgPCAwIGFuZCB6IDwgMDoKICAgICAgICAgICAgcHJpbnQoJ04zJykKICAgICAgICBlbHNlOgogICAgICAgICAgICBwcmludCgnTjInKQogICAgZWxzZToKICAgICAgICBwcmludCgnTjEnKQojIEJsb2NrLTIgRW5k