import math
from functools import reduce

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

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

N = int(input())
A = [int(i) for i in input().split()]

flag1 = True
for i in range(N-1):
  for j in range(i+1,N):
    if gcd(A[i], A[j]) != 1:
      flag1 = False
      break
  if not flag1:
    break
flag2 = False
if not flag1:
  flag2 = True if gcd_list(A) == 1 else False

if flag1:
  print("pairwise coprime")
elif flag2:
  print("setwise coprime")
else:
  print("not coprime")