import math
def main():
    n = int(input())
    a = list(map(int,input().split()))
    lcm = [0]*n
    lcm[n-1] = a[n-1]
    for i in range(n-2,0,-1):
        # print(f"{i} , {a[i]} , {lcm[i+1]}")
        lcm[i] = (a[i]*lcm[i+1])//(math.gcd(a[i],lcm[i+1]))
    totgcd = a[0]
    for i in range(1,n):
        totgcd = math.gcd(totgcd,a[i])
    bol = 1
    # for i in range(1,n):
    #     print(f"{lcm[i]}")
    # print(f" yo {(4*5)//math.gcd(4,5)}")
    for i in range(0,n-1):
        x = math.gcd(a[i],lcm[i+1])
        if x != 1:
            bol = 0
            break
    if bol==1:
        print("pairwise coprime")
    elif totgcd==1:
        print("setwise coprime")
    else:
        print("not coprime")
main()