import math
n = int(input())
lis = list(map(int,input().split()))
lis.sort(reverse=True)
num = lis[0]
for nu in lis:
    num = math.gcd(num,nu)
exist = [0 for i in range(max(lis)+1)]
if num != 1:
    print("not coprime")
    exit()
for nu in lis:
    if nu != 1:
        for i in range(2,math.ceil(math.sqrt(nu))+1):
            if nu % i == 0:
                if exist[i] == 1:
                    print("setwise coprime")
                    exit()
                else:
                    exist[i] = 1
                    while nu % i == 0:
                        nu //= i
print("pairwise coprime")