from math import *
from collections import *
n=int(input())
a=list(map(int,input().split()))
g=[[]for i in range(10**6+2)]
l=[]
for i in range(2,10**6+1):
    for j in (i,10**6+1,i):
        g[j].append(i)
flg1,flg2=True,True
for i in a:
    for j in g[i+1]:
        if j not in l:
            l.append(j)
        else:
            flg1=False
tmp=a[0]
for i in a:
    tmp=gcd(tmp,i)
if tmp>1:
    flg2=False
if flg1:
    print("pairwise coprime")
    exit()
if flg2:
    print("setwise coprime")
    exit()
print("not coprime")