import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
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 ** 3 + 5
is_prime = [True] * (MAX)
is_prime[0] = False
is_prime[1] = False
i = 2
primes = []
while i < MAX:
    if is_prime[i]:
        for j in range(i+i, MAX, i):
            is_prime[j] = False
        primes.append(i)
    i += 1

cnt = defaultdict(int)
for a in A:
    x = a
    for p in primes:
        if x % p == 0:
            cnt[p] += 1
        while x > 1 and x % p == 0:
            x //= p
        if x <= 1:
            break
    if x > 1:
        cnt[x] += 1
if max(cnt.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')