import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
import copy
# from fractions import gcd

MOD = 10 ** 9 + 7
# MOD = 998244353
# sys.setrecursionlimit(10**8)

n = int(input())
A = set(map(int, input().split()))
N = 10**6
furui = [True]*(N+1)

state = "pairwise coprime"
for i in range(2, N):
    if not furui[i]:
        continue
    count = 0
    k = i
    while k <= N:
        if k in A:
            count += 1
            if count == 2:
                state = "setwise coprime"
            if count == n:
                print("not coprime")
                exit()

        furui[k] = False
        k += i

print(state)
