# -*- coding: utf-8 -*-
import math
from functools import reduce

N= int(input())
A= list(map(int,input().split(' ')))

ans = True
for i in range(len(A)-1):
  for j in range(i+1, len(A)):
    if math.gcd(A[i], A[j]) != 1:
      ans = False
      break

if ans:
  print('pairwise coprime')
else:
  print('setwise coprime' if reduce(math.gcd, A) == 1 else 'not coprime')
