#abc177 e
import sys,math,collections,itertools
input = sys.stdin.readline


N=int(input())
A=list(map(int,input().split()))
num = [0]*(10**6+1)
for a in A:
    num[a]+=1
    i=2
    while i*i <=a:
        if a%i==0:
            num[i]+=1
            if i*i != a:
                num[a//i]+=1
        i+=1
mn = max(num)

if mn == 1:
    print('pairwise coprime')
elif mn ==N:
    print('not coprime')
else:
    print('setwise coprime')
