from math import *
from collections import *
from itertools import *
from functools import *
from bisect import *
from heapq import *
from operator import *
from sys import *
setrecursionlimit(100000000)


def pf(n):
    # primfac = []
    d = 2
    while d*d <= n:
        if (n % d) == 0:
            yield d
        while (n % d) == 0:
            n //= d
        d += 1
    if n > 1:
       yield n

MAX=(2*(10**6))
MIN=float('-inf')
MOD=1000000007
n = int(input())
a = list(map(int,input().split()))

cnt = [0]*MAX
loop_end = False
g = 0
pairwise_coprime = True
setwise_coprime = True
    

for ai in a:
  for p in pf(ai):
    if cnt[p]:
      pairwise_coprime = False
      loop_end = True  
    cnt[p] = 1
    if loop_end:
      break
  if loop_end:
    break

for ai in a:
  g = gcd(g,ai)
setwise_coprime = g==1

if pairwise_coprime:
  print('pairwise coprime')
elif setwise_coprime:
  print('setwise coprime')
else:
  print('not coprime')
