def erathos(N):
    res = []
    D = [True] * (N+1)
    D[0] = False
    D[1] = False
    for i in range(2,N+1):
      if not D[i]:
        continue
      res.append(i)
      j = i * 2
      while j <= N:
        D[j] = False
        j += i
    return res;

def prime_set(a, plist):
    res = set()
    for prime in plist:
      while a % prime == 0:
        a = a // prime
        res.add(prime)
    if a > 2:
      res.add(a)
    return res
  
def main():
    import sys
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
    plist = erathos(1000)
    
    Factors = []
    for a in A:
      Factors.append(prime_set(a, plist))
    
    fset = set(Factors[0])
    fcommon = set(Factors[0])
    eleflg = True
    for f in Factors[1:]:
      fcommon = fcommon & f
      if len(fset & f) == 0:
        fset = fset | f
      else:
        eleflg = False
        # 互いに素でないペアがいる
        pass
    if len(fcommon) > 0:
      print("not coprime")
    elif eleflg:
      print("pairwise coprime")
    else:
      print("setwise coprime")
    #print(fcommon)
    exit(0)

main()
