import math
import sys
from collections import Counter

n = int(input())
a = list(map(int,input().split()))
ma = max(a)
pc = True

if ma == 1:
    print("pairwise coprime")
    sys.exit()
if len(Counter(a)) != n:
    pc = False
    
cu = [0]*(ma+1)
for i in a:
    cu[i] = 1

for i in range(2,ma+1):
    aa = 0
    for j in range(i,ma+1,i):
        aa += cu[i]
    if aa > 1:
        pc = False

gc = a[0]
for i in a[1:]:
    gc = math.gcd(i,gc)
    
if pc:
    print("pairwise coprime")
elif gc == 1:
    print("setwise coprime")
else:
    print("not coprime")