import sys
#ユークリッドの互除法
def gcd(x, y):
    if x % y == 0:
        return y
    else:
        return gcd(y, x % y)
#入力
N = int(input())
A = list(map(int, input().split()))
#カウントしていく
count= [0] * (1000001)
setwise_gcd = A[0]
for i in range(0,N):
    count[A[i]]+= 1
    setwise_gcd = gcd(setwise_gcd, A[i])

#全体のgcdが1でないならnot coprime
if setwise_gcd != 1:
    print("not coprime")
    sys.exit(0)
#A[x] % i == 0 && A[y] % i == 0 となるx, y が存在しないならpairwise coprime
for i in range(2,1000001):
    divided_count = count[i]
    now_number = 2 * i
    while(now_number<1000001):
        divided_count+= count[now_number]
        now_number+= i
    if(divided_count >= 2):
        print("setwise coprime")
        exit(0)
print("pairwise coprime")
