import math
import itertools
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

n = int(input())
aaa = list(map(int, input().split()))

result = 'not coprime'

if gcd(*aaa) == 1:
  result = 'setwise coprime'
  
for a, aa in itertools.combinations(aaa, 2):
  if math.gcd(a, aa) != 1:
    break
else:
  result = 'pairwise coprime'
  
print(result)