n = int(input())
arr = list(map(int,input().split()))
def find_gcd(x, y): 
    while(y): 
        x, y = y, x % y 
    return x 
def overAllGCD(l):
    num1 = l[0] 
    num2 = l[1] 
    gcd = find_gcd(num1, num2) 
    for i in range(2, len(l)): 
        gcd = find_gcd(gcd, l[i]) 
    return(gcd)
allGCDs = []
for i in range(n):
    for j in range(i+1,n):
        allGCDs.append(find_gcd(arr[i],arr[j]))
import collections
c = collections.Counter(allGCDs)
overGCD = overAllGCD(arr)
if len(c) == 1 and 1 in c:
    print("pairwise coprime")
elif overGCD == 1:
    print("setwise coprime")
else:
    print("not coprime")


