import sys
input = sys.stdin.readline
import numpy as np
N = int(input())
A = np.array(list(map(int,input().split())))

def sieve_Eratosthenes(n):
    f = [True]*(n+1)
    f[0] = False
    f[1] = False
    m = int(n**0.5+1)
    for i in range(2,m):
        if f[i]:
            for j in range(i*i,n+1, i):
                f[j] = False
    return f

def getPrimeLists(n):
    table = sieve_Eratosthenes(n)
    return [x for x in range(2,n+1) if table[x]]

primes = getPrimeLists(10**6+10)
for p in primes:
    if N - np.count_nonzero(A % p) > 1:
        break
else:
    print('pairwise coprime')
    exit()

allgcd = np.gcd.reduce(A)
if allgcd == 1:
    print('setwise coprime')
    exit()

print('not coprime')
