import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  N=I()
  A=LI()
  
  l=[0]*1000100
  for x in A:
    for y in range(2,int(math.sqrt(x))+1):
      if x%y==0:
        a=x//y
        l[y]+=1
        if y!=a:
          l[a]+=1

  # print(l[:10])

  f1=True
  f2=False
  for x in l:
    if x>1:
      f1=False

  if f1:
    return 'pairwise coprime'

  g=0
  for x in A:
    g=math.gcd(g,x)

  if g==1:
    return 'setwise coprime'

  return 'not coprime'

# main()
print(main())
