from sys import stdin
from collections import defaultdict 
# from bisect import *
# from heapq import *
# import math
# mod = 10**9+7

N = input()
A = list(map(int, input().split()))
M = 10**3+1
ps = []
is_p = [True] * M
for i in range(2, M):
    if is_p[i]:
        ps.append(i)
        j = i + i
        while j < M:
            is_p[j] = False
            j += i
cnt = defaultdict(int)
for a in A:
    for p in ps:
        if a % p == 0:
            cnt[p] += 1
            while a % p == 0:
                a //= p
    if a > 1:
        cnt[a] += 1
if all([x < 2 for x in cnt.values()]):
    print("pairwise coprime")
    exit()
gcd = lambda x, y : x if y == 0 else gcd(y, x % y)
x = A[0]
for a in A[1:]:
    x = gcd(x, a)
if x == 1:
    print("setwise coprime")
else:
    print("not coprime")