import sys
readline = sys.stdin.readline

N = int(readline())
A = list(map(int,readline().split()))

from functools import reduce

import math

alls = reduce(math.gcd, A)

if alls != 1:
  print("not coprime")
  exit(0)
  
# 素因数のペアが存在するかを探す
facts = [False] * (10 ** 6)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

for a in A:
  cur = factorization(a)
  for f in cur:
    if facts[f[0]]:
      print("setwise coprime")
      exit(0)
    else:
      facts[f[0]] = True
else:
  print("pairwise coprime")