from math import gcd

n = int(input())
A = list(map(int,input().split()))
d  =[0]*(2*10**6+1)
c = [0]*(2*10**6+1)
max_val = max(A)
for a in A:
    d[a] += 1
A.sort()
flag = True
for i in range(2,max_val+1):
    if c[i]==0:
        flag = True
        for j in range(i,max_val+1,i):
            c[j]=1
            if d[j] !=0 and flag:
                flag = False
                d[j] = 0
                break
for a in d:
    if d[i] != 0:
        flag = True
        break
                    

if not flag :
    print('pairwise coprime')
    exit()
d  =[0]*(2*10**6+1)
c = [0]*(2*10**6+1)
max_val = max(A)
cnt = True
for a in A:
    d[a] += 1
A.sort()
set_ = set()
for i in range(2,max_val+1):
    if c[i]==0:
        for j in range(i,max_val+1,i):
            c[j]=1
            if d[j] != 0:
                if i not in set_:
                    set_.add(i)
                d[j] = 0
if len(set_)==1:
    print('not coprime')
else:
    print('setwise coprime')
