import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
n=int(input())
aa=list(map(int,input().split()))
x=1
for a in aa:
  x*=a
if lcm_list(aa)==x:
  print("pairwise coprime")
elif gcd_list(aa)==1:
  print("setwise coprime")
else:
  print("not coprime")
