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


flag =0
n = int(input())
lis = list(map(int, input().split()))
for i in range(n-1):
    if findgcd(lis[i],lis[i+1]) != 1:
        flag = 1
        break
if(flag):
    num1 = lis[0]
    num2 = lis[1]
    gcd = findgcd(num1,num2)
    for i in range(2, len(lis)):
        gcd = findgcd(gcd, lis[i])
    if gcd == 1:
        flag = 2
if flag == 2:
    print("setwise coprime")
elif flag == 0:
    print("pairwise coprime")
else:
    print("not coprime")
