import numpy as np
import itertools as it
def gcd(a,b):
  while b!=0:
    a,b = b, a%b
  return a
n = int(input())
a = list(map(int, input().split()))
ac = list(it.combinations(a,2))
pw = True
for i,j in ac:
  if gcd(i,j)!=1:
    pw = False
if pw:
  ans = 'pairwise coprime'
elif np.gcd.reduce(a)==1:
  ans = 'setwise coprime'
else:
  ans = 'not coprime'
print(ans)