import math, collections

n = int(input())
a = list(map(int, input().split()))

def prime(n):
    p = []
    flag = [True] * (n - 1)
    for i in range(n - 1):
        if flag[i] == True:
            p.append(i + 2)
            num = i
            while num <= n - 2:
                flag[num] = False
                num += i + 2
    return p

gcd = 0
for i in range(n):
    gcd = math.gcd(gcd, a[i])
if gcd != 1:
    print("not coprime")
else:
    flag = True
    a2 = collections.deque(a)
    while len(a2) > 1:
        temp1 = a2.popleft()
        temp2 = a2.popleft()
        if math.gcd(temp1, temp2) != 1:
            print("setwise coprime")
            break
        else:
            a2.append(temp1 * temp2)
    else:
        print("pairwise coprime")