n = int(input())
a = list(map(int, input().split()))

from math import gcd

tmp1 = a[0]
for i in range(1, n):
    tmp1 = gcd(tmp1, a[i])

tmp2 = a[0]
flg2 = True
for i in range(1, n):
    if gcd(tmp2, a[i]) != 1:
        flg2 = False
        break
    tmp2 *= a[i]

if flg2:
    print('pairwise coprime')
elif tmp1 == 1:
    print('setwise coprime')
else:
    print('not coprime')