import sys
import numpy as np

def gcd(x,y):
    while y:
        x,y = y , x % y 
    return x


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


gcd_all = a[0]
for i in range(1,n):
    gcd_all = gcd(gcd_all,a[i])
    
if gcd_all>1:
    print("not coprime")
    sys.exit()

amax = a.max()

aflag = np.zeros(amax,np.int64)
aflag[a-1] = 1

for i in range(2,amax+1):
    index = (np.arange(amax//i)+1)*i - 1
    count = aflag[index].sum()
    if count>=2:
        print("setwise coprime")
        sys.exit()
else:
    print("pairwise coprime")