
import math
n=int(input())
a = list(map(int, input().split()))
pair_check=[]
for i in range(n):
    for k in range(i+1,n):
        pair_check.append(math.gcd(a[i],a[k]))
ans = a[0]
pair_check_check=0
for i in range(1, n):
    ans = math.gcd(ans, a[i])

for i in range(len(pair_check)):
    if pair_check[i]==1:
        pair_check_check+=1

if pair_check_check==len(pair_check):
    print("pairwise coprime")
    exit()

elif ans==1:
    print("setwise coprime")
    exit()
else:
    print("not coprime")