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
#!/usr/bin/python
"Solve the Primality Testing problem at CodeChef"
import sys, os, math
if False:  # change to True to enable JIT compilation
 import psyco
 psyco.full()
DEBUGGING = os.getenv('DEBUGGING', False)
PROFILING = os.getenv('PROFILING', False)
def main():
 composite = False
 # make primes list just large enough to pass CodeChef test
 # in any case there's not enough memory for sqrt(10 ** 999)
 primes = sieve(300)  
 testcase = long(raw_input())
 for prime in primes:
  #debug("testing %s %% %d" % (testcase, prime))
  if prime >= testcase:
   break
  elif testcase % prime == 0:
   composite = True
   break
 print ["PRIME", "COMPOSITE"][int(composite)]
def sieve(number = sys.maxint - 1):
 numbers = range(number + 1)
 numbers[1] = 0  # 1 is not a prime; it is a unit
 limit = int(number ** 0.5) + 1
 for i in xrange(2, limit):
  if numbers[i]:
   numbers[2 * i:(number / i) * (i + 1):i] = [0] * ((number / i) - 1)
 return filter(None, numbers)
def debug(message):
 if DEBUGGING: print >>sys.stderr, message
if __name__ == '__main__':
 if PROFILING:
  import cProfile
  cProfile.run("main()")
 else:
  main()