import math
N = int(input())
A = list(map(int,input().split()))
ls = []
now = A[0]
for i in range(1,N):
    ls.append(math.gcd(now,A[i]))
    now = math.gcd(now,A[i])
if ls.count(1) == N-1:
    print("pairwise coprime")
else:
    if ls[-1] == 1:
        print("setwise coprime")
    else:
        print("not coprime")