N = int(input())
a = [int(x) for x in input().split()]
import math
b = 0
if N <= 10000:
    for i in range(N-1):
        for j in range(i+1,N):
            m = math.gcd(a[i],a[j])
            if m != 1:
                b = 1
    if b == 0:
        print("pairwise coprime")
        exit()
ans = a[0]
for i in range(1,N):
    ans = math.gcd(ans,a[i])
if ans == 1:
    print("setwise coprime")
else:
    print("not coprime")