def isPrime(x :int):
    if(x == 1):
        return False

    for i in range(2, int(x**0.5)+1):
        if(x%i == 0):
            return False
    return True

n = int(input())
L = list(map(int,input().split()))

from math import gcd
from  functools import reduce

flag = False

for i in range(n):
    if isPrime(L[i]):
        flag = True
        #print(flag)
    elif L[i] == 1:
        flag = True
    else:
        flag = False
        #print(L[i])
        break
a = reduce(gcd,L)


if flag:
    print("pairwise coprime")
elif  a == 1:
    print("setwise coprime") 
else:
    print("not coprime")