#                               #
    # author : samars_diary #
    # 13-09-2020 │ 11:54:36 #
#                               #

import sys, os.path, math

#if(os.path.exists('input.txt')):
    #sys.stdin = open('input.txt',"r")
    #sys.stdout = open('output.txt',"w")

sys.setrecursionlimit(10 ** 5)

def mod(): return 10**9+7
def i(): return sys.stdin.readline().strip()
def ii(): return int(sys.stdin.readline())
def li(): return list(sys.stdin.readline().strip())
def mii(): return map(int, sys.stdin.readline().split())
def lii(): return list(map(int, sys.stdin.readline().strip().split()))

#print=sys.stdout.write

def solve():
    a=ii();b=lii();c=[];d=b[0]
    for i in range(a-1):
        for j in range(i+1, a):
            c.append(math.gcd(b[i],b[j]))
    for i in range(1, a):
        d=math.gcd(d, b[i])
    if len(set(c))==1 and c[0]==1:
        print('pairwise coprime')
    elif d==1:
        print('setwise coprime')
    else:
        print('not coprime')
solve()