import sys,os
import math
from fractions import Fraction 
from collections import defaultdict
from random import randint

# sys.stderr=open('err.txt','w')
# sys.stdout=open('output.txt','w')
# sys.stdin=open('input.txt','r')

def linput():
    return list(minput())

def minput():
    return map(int, sys.stdin.readline().strip().split())

###############################################################

def gdc(a,b):
    if a==0:
        return b
    if b==0:
        return a
    if a==b:
        return a
    if a>b:
        return gdc(a-b,b)
    else:
        return gdc(b,a)

n=int(input())
a=linput()
flg=0
for i in range(len(a)-1):
    if gdc(a[i],a[i+1])!=1:
        flg=1
        break
if flg==0:
    print("pairwise coprime")
else:
    g=gdc(a[0],a[1])
    for i in range(2,len(a)):
        g=gdc(g,a[i])
    if g==1:
        print("setwise coprime")
    else:
        print("not coprime")