import math
import functools
def euclid(a, b):
    if b == 0:
        return a
    else:
        return euclid(b, a%b)
        
def gcd(nums):
    return functools.reduce(euclid, nums)

n = int(input())
a = list(map(int, input().split()))
ans = 'pairwise coprime'
for i in range(n - 1):
  if ans == 'pairwise coprime':
    for j in range(i + 1, n):
      if math.gcd(a[i], a[j]) != 1:
        ans = 'setwise coprime'
        break
if ans != 'pairwise coprime' and gcd(a) != 1:
  ans = 'not coprime'
print(ans)