import math
from functools import reduce

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

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
a = list(map(int, input().split()))
b = gcd_list(a)
c = lcm_list(a)
d = 1
for i in range(n):
  d *= a[i]
if d == c:
  print('pairwise coprime')
elif b == 1:
  print('setwise coprime')
else:
  print('not coprime')
