from functools import reduce
from fractions import gcd
import sys

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

# pairwise = lcd(A)!=pi A
lcm = 1
pia = 1
for a in A:
    lcm =  lcm*(a//gcd(lcm, a))
    pia = pia * a
if lcm == pia:
    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')
