from collections import Counter
import sys
import numpy as np
n = int(input())
ls = list(map(int,input().split()))
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
            for _ in range(cnt):
                arr.append(i)

    if temp!=1:
        arr.append(temp)

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

    return arr
if len(list(set(ls))) != len(ls):
    print("not coprime")
    sys.exit()
c = Counter(ls)
s = list(set(ls))
if np.gcd.reduce(ls) == 1:
    fi = [True]*(10**6+1)
    for y in s:
        l = list(set(factorization(y)))
        l.sort()
        for q in l:
            u = q * 2
            while u <= 10**6:
                if u in s and u > y:
                    fi[u] = False
                u += q
    cnt = 0
    for z in ls:
        if fi[z] == True:
            cnt += 1
    if cnt == len(ls):
        print("pairwise coprime")
    else:
        print(cnt)
        print("setwise coprime")
else:
    print("not coprime")