import numpy as np

n=int(input())
a=list(map(int,input().split()))

gx=list()

jud=0
x=1

for i in range(n):
    j=1
    while i+j<n:
        if np.gcd(a[i],a[i+j])!=1:
            jud=1
            x=0
            break
        j+=1
    if x==0:
        break

if jud==0:
    print("pairwise coprime")
elif np.gcd.reduce(a)==1:
    print("setwise coprime")
else:
    print("not coprime")
