from math import gcd
from functools import lru_cache

@lru_cache(maxsize=None)
def mygcd(a):
    return gcd(a[0],a[1])
    
N=int(input())
A=list(map(int,input().split()))
for i in range(N-1):
    for j in range(i+1,N):
        g = mygcd((A[i],A[j]))
        if g != 1:
            break
    else:
        continue
    break
else:
    print("pairwise coprime")
    exit()
s=A.pop(0)
for i in A:
    s = mygcd((s,i))
    if s == 1:
        print("setwise coprime")
        break
else:
    print("not coprime")
