import math
n = int(input())
a = list(map(int,input().split()))
a.sort()
k = math.gcd(a[0],a[1]) #最大公約数
m = a[0]*a[1]//math.gcd(a[0],a[1]) #最小公倍数
j = a[0]*a[1]#漱石

for i in range(2,n):
    j*=a[i]
    m = m*a[i]//math.gcd(a[i],m)
    k = math.gcd(k,a[i])
    
if(k==1):
    if(m==j):
        print("setwise coprime")
    else:
        print("pairwise coprime")
else:
    print("not coprime")
