import math

n = int(input())

l = list(map(int,input().split()))
ans = 1

for i in l:
    ans*=i
f=0
for i in range(n):
    x = ans//l[i]
    if math.gcd(x,l[i])!=1:
        f = 1
        break
    
if f==0:
    print('pairwise coprime')
    exit()

x = l[-1]

for i in range(n):
    x = math.gcd(x,l[i])

if x==1:
    print('setwise coprime')
    exit()
else:
    print('not coprime')