import math
def Lcm(a,b):
    return (a*b)//math.gcd(a,b)
n = int(input())
l = list(map(int,input().split()))
lcm = l[0]
hcf = lcm
prod = lcm
for i in range(1,len(l)):
    prod = prod*l[i]
    hcf = math.gcd(hcf,l[i])
    lcm = Lcm(lcm,l[i])
if(prod==lcm):
    print("pairwise coprime")
elif(hcf==1):
    print("setwise coprime")
else:
    print("not coprime")
