import math
N = int(input())
A = list(map(int, input().split()))

dp = [0] * (10**6 + 1)

for a in A:
    for i in range(1, int(math.sqrt(a)) + 1):
        if a % i == 0:
            dp[i] += 1
            if i != a // i:
                dp[a // i] += 1
            
ans = 0

for i in range(2, max(A) + 1):
    ans = max(ans, dp[i])

if ans == 1:
    print("pairwise coprime")

elif ans < N:
    print("setwise coprime")
    
else:
    print("not coprime")