def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
def gcdlist(l):
    a = l[0]
    for i in range(len(l)):
        a = gcd(a,l[i])
    return a
def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
import numpy as np
primelist=primes(1000000)
n=int(input())
L=np.array(list(map(int,input().split())))
ans='not coprime'
if gcdlist(L)==1:
    ans='pairwise coprime'
    for i in primelist:
        if sum(L%i==0)>1:
            ans='setwise coprime'
            break
        if max(L)**0.5+1<i:
            break
print(ans)