from math import gcd

n = int(input())
a = [int(_) for _ in input().split()]

pre = a[0]
g = a[0]
flg = True
for idx, i in enumerate(a):
    if idx == 0:
        continue
    g = gcd(g, i)
    if flg:
        if gcd(pre, i) == 1:
            pre = pre * i % 1000000
        else:
            flg = False
if flg:
    print('pairwise coprime')
else:
    if g == 1:
        print('setwise coprime')
    else:
        print('not coprime')