import math
n = int(input())
a = list(map(int,input().split()))
ans = "pairwise coprime"
k = math.gcd(a[0],a[1])
a.sort()
v = 0
m = math.gcd(a[0],a[1])
if(m!=1):
    v += 1
for i in range(2,n):
    m = math.gcd(a[i],a[i-1])
    if(m!=1):
        v += 1
    k = math.gcd(k,a[i])
if(k==1):
    if(v>0):
        print("setwise coprime")
    else:
        print("pairwise coprime")
else:
    print("not coprime")