n = int(input())
a = list(map(int, input().split()))
import math
gcd_list = []
for i,j in zip(a,a[1:]):
    gcd = math.gcd(i,j)
    gcd_list.append(gcd)

g = gcd_list[0]
for gcd in gcd_list[1:]:
    g = math.gcd(g, gcd)

if all([i==1 for i in gcd_list]):
    print('pairwise coprime')
elif g == 1:
    print('setwise coprime')
else:
    print('not coprime')