import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
from collections import Counter
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 10 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

N = int(input())
A = list(map(int, input().split()))
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

# calc prime
MAX = 10 ** 6 + 2
is_prime = [True] * (MAX + 1)
is_prime[0] = False
is_prime[1] = False
i = 2
primes = []
cnt_a = Counter(A)
cnt_facts = defaultdict(int)
while i < MAX:
    if is_prime[i]:
        if cnt_a[i]:
            cnt_facts[i] += cnt_a[i]
        for j in range(i+i, MAX, i):
            is_prime[j] = False
            if cnt_a[j]:
                cnt_facts[i] += cnt_a[j]
        primes.append(i)
    i += 1
if cnt_facts and max(cnt_facts.values()) <= 1:
    print('pairwise coprime')
    exit()
setwise = False
g = A[0]
for a in A:
    g = gcd(g, a)
if g == 1:
    setwise = True

if setwise:
    print('setwise coprime')
if not setwise:
    print('not coprime')