N = int(input())
A = list(map(int, input().split()))
max_A = 10**6+1

dp = [0] * (max_A)
for i in range(N):
    dp[A[i]] += 1

pairwize = True

for i in range(2, max_A):
    cnt = 0
    # 素数の倍数がdp配列に存在するか。自分以外にあれば2以上になる
    for j in range(i, max_A, i):
        cnt += dp[j]
    if cnt > 1:
        pairwize = False

if pairwize:
    print("pairwize coprime")
    exit()

from math import gcd

g = 0
for i in range(N):
    g = gcd(g, A[i])
if g == 1:
    print("setwize coprime")
else:
    print("not coprime")

