import sys
import math
import random
from collections import defaultdict
input = sys.stdin.readline
def is_prime(q,k=50):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    d = (q-1)>>1
    while d&1 == 0:
        d >>= 1

    for i in range(k):
        a = random.randint(1,q-1)
        t = d
        y = pow(a,t,q)
        while t != q-1 and y != 1 and y != q-1: 
            y = pow(y,2,q)
            t <<= 1
        if y != q-1 and t&1 == 0:
            return False
    return True

def fact(n):
    ret = set()
    for i in range(2, math.floor(math.sqrt(n))+1):
        if n % i == 0:
            ret.add(i)
            while n % i == 0:
                n //= i
    if n != 1:
        ret.add(n)
    return ret
def pairwise(A):
    primes = set()
    for a in A:
        if is_prime(a):
            primes.add(a)
        else:
            ret = fact(a)
            if ret.intersection(primes):
                return False
            else:
                primes |= ret
    return True
def setwise(A):
    g = A[0]
    for i in range(1,len(A)):
        g = math.gcd(g, A[i])
        if g == 1:
            return True
    return False
    
if __name__ == "__main__":
    N = int(input())
    A = list(map(int,input().split()))
    if pairwise(A):
        print("pairwise coprime")
    elif setwise(A):
        print("setwise coprime")
    else:
        print("not coprime")