from math import gcd
N=int(input())
A=list(map(int,input().split()))
for i in range(N-1):
    for j in range(i+1,N):
        g = gcd(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 = gcd(s,i)
    if s == 1:
        print("setwise coprime")
        break
else:
    print("not coprime")
