Modern cryptosystems rely heavily on our inability to factor large integers quickly as the basis for their security. They need a quick and easy way to generate and test for primes. Very often, the primes generated are very large numbers. You need to implement ways to test the primality of very large numbers.

Input
Line 1: A number (no more than 1000 digits long)

Output
Line 1: PRIME or COMPOSITE

Example

Input:
2760727302517

Output:
PRIME
import sys
import random

def toBinary(n):
  r = []
  while (n > 0):
    r.append(n % 2)
    n = n / 2
  return r

def test(a, n):
  """
  test(a, n) -> bool Tests whether n is composite.

  Returns:
    - True, if n is composite.
    - False, if n is probably prime.
  """
  b = toBinary(n - 1)
  d = 1
  for i in xrange(len(b) - 1, -1, -1):
    x = d
    d = (d * d) % n
    if d == 1 and x != 1 and x != n - 1:
      return True # Complex
    if b[i] == 1:
      d = (d * a) % n
  if d != 1:
    return True # Complex
  return False # Prime

def MillerRabin(n, s = 50):
  """
    MillerRabin(n, s = 1000) -> bool Checks whether n is prime or not

    Returns:
      - True, if n is probably prime.
      - False, if n is composite.
  """
  for j in xrange(1, s + 1):
    a = random.randint(1, n - 1)
    if (test(a, n)):
      return "COMPOSITE" # n is composite
  return "PRIME" # n is prime

def main():
  from sys import stdin,stdout
  
  print MillerRabin(int(sys.stdin.read()), 5)

if __name__ == "__main__":
  main()