n = int(input())
a = list(map(int,input().split()))
import sys
import math
import functools
g = functools.reduce(math.gcd,a)

num = 10**2   
li = [0]*num
for k in a:
    if li[k-1]==0:
        li[k-1] += 1
    else:
        if k-1!=0:
            print("not coprime")
            sys.exit()

i=2
while i<=num:
    #print([li[k*i-1] for k in range(1,num//i+1)])
    if sum([li[k*i-1] for k in range(1,num//i+1)])>1:
        break
    i+=1
else:
    print("pairwise coprime")
    sys,exit()


if g==1:
    print("setwise coprime")
    sys.exit()

print("not coprime")
sys.exit()