def prime(p):
    memo = set()
    for i in range(2,(int(p**0.5)+1)):
        while p%i==0:
            p //= i
            memo.add(i)
    if p != 1:
        memo.add(p)
    return memo

from math import gcd

N = int(input())

A = list(map(int,input().split()))

tmp_gcd = A[0]

for i in range(1,N):
    tmp_gcd = gcd(tmp_gcd, A[i])

if 1 < tmp_gcd:
    print('not coprime')
    exit()

servive_prime = set()
for a in A:
    now_prime = prime(a)
    tmp_prime = servive_prime.union(now_prime)
    if len(tmp_prime) < len(servive_prime) + len(now_prime):
        print('setwise coprime')
        exit()
    servive_prime = tmp_prime
print('pairwise coprime')
    