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

pc = True
g = A[0]
for i in range(1, N):
    if gcd(A[i], A[i-1]) > 1:
        pc = False
    g = gcd(g, A[i])

if pc:
    print("pairwise coprime")
elif g == 1:
    print("setwise coprime")
else:
    print("not coprime")