import math
n = int(input())
a = list(map(int,input().split()))
k = math.gcd(a[0],a[1]) #最大公約数
j = a[0]*a[1]#漱石
v = 0
for i in range(2,n):
    j*=a[i]
    k = math.gcd(k,a[i])
for i in range(n):
    if(j//a[i]%a[i]==0)and(a[i]!=1):
        v += 1
        break
if(k==1):
    if(v>0):
        print("setwise coprime")
    else:
        print("pairwise coprime")
else:
    print("not coprime")
