from functools import reduce
from fractions import gcd
import sys

N = int(input())
A = list(map(int, input().split()))
P = 10 ** 9 + 7

lcm = 1
flg = True
pia = 1
"""
for a in A:
    pia = (pia * a) % P
    if gcd(lcm, a) != 1:
        flg = False
        break
    lcm = (lcm*a)%P
if flg:
    print('pairwise coprime')
    sys.exit()
"""

gcd_ = A[0]
for a in A[1:]:
    gcd_ = gcd(gcd_, a)
    if gcd_ == 1:
        print('setwise coprime')
        sys.exit()

print('not coprime')
