import math

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

flag = 0
pairw = 0
setw = a[n-1]

for i in range(n-1):
    pairw = math.gcd(a[i],a[i+1])
    setw = math.gcd(setw,a[i])
    if pairw != 1:
        flag = 1

pairw = math.gcd(a[n-1],a[1])
if pairw != 1:
    flag = 1

if flag == 1:
    if setw == 1:
        print('setwise coprime')
    else:
        print('not coprime')
else:
    print('pairwise coprime')
